HadoopClusterManager implements RuntimeTestProgressCallback { public boolean isValidConfigurationFile( String fileName ) { return fileName != null && ( fileName.endsWith( "-site.xml" ) || fileName.endsWith( "-default.xml" ) || fileName.equals( CONFIG_PROPERTIES ) || fileName.equals( KEYTAB_AUTH_FILE ) || fileName.equals( KEYTAB_IMPL_FILE ) || fileName.equals( "data" ) ); } HadoopClusterManager( Spoon spoon, NamedClusterService namedClusterService, IMetaStore metaStore,
                               String internalShim ); JSONObject importNamedCluster( ThinNameClusterModel model,
                                        Map<String, CachedFileItemStream> siteFilesSource ); JSONObject createNamedCluster( ThinNameClusterModel model,
                                        Map<String, CachedFileItemStream> siteFilesSource ); JSONObject editNamedCluster( ThinNameClusterModel model, boolean isEditMode,
                                      Map<String, CachedFileItemStream> siteFilesSource ); ThinNameClusterModel getNamedCluster( String namedCluster ); JSONObject installDriver( FileItemStream driver ); boolean isValidConfigurationFile( String fileName ); void deleteNamedCluster( IMetaStore metaStore, String namedCluster, boolean refreshTree ); Object runTests( RuntimeTester runtimeTester, String namedCluster ); void onProgress( final RuntimeTestStatus clusterTestStatus ); static final String STRING_NAMED_CLUSTERS; static final String PLACEHOLDER_VALUE; }
@Test public void testValidSiteFile() { assertFalse( hadoopClusterManager.isValidConfigurationFile( "file" ) ); assertTrue( hadoopClusterManager.isValidConfigurationFile( CORE_SITE ) ); assertTrue( hadoopClusterManager.isValidConfigurationFile( "config.properties" ) ); }