@Test public void testGetNamedCluster() throws ConfigurationException { ThinNameClusterModel model = new ThinNameClusterModel(); model.setName( ncTestName ); JSONObject result = hadoopClusterManager.createNamedCluster( model, getFiles( "/" ) ); assertEquals( ncTestName, result.get( "namedCluster" ) ); ThinNameClusterModel nc = hadoopClusterManager.getNamedCluster( "NCTEST" ); assertEquals( "ncTest", nc.getName() ); }
public ThinNameClusterModel getNamedCluster( String namedCluster ) { ThinNameClusterModel model = null; try { List<NamedCluster> namedClusters = namedClusterService.list( metaStore ); for ( NamedCluster nc : namedClusters ) { if ( nc.getName().equalsIgnoreCase( namedCluster ) ) { model = new ThinNameClusterModel(); model.setName( nc.getName() ); model.setHdfsHost( nc.getHdfsHost() ); model.setHdfsUsername( nc.getHdfsUsername() ); model.setHdfsPassword( nc.decodePassword( nc.getHdfsPassword() ) ); model.setHdfsPort( nc.getHdfsPort() ); model.setJobTrackerHost( nc.getJobTrackerHost() ); model.setJobTrackerPort( nc.getJobTrackerPort() ); model.setKafkaBootstrapServers( nc.getKafkaBootstrapServers() ); model.setOozieUrl( nc.getOozieUrl() ); model.setZooKeeperPort( nc.getZooKeeperPort() ); model.setZooKeeperHost( nc.getZooKeeperHost() ); resolveShimVendorAndVersion( model, nc.getShimIdentifier() ); model.setGatewayPassword( nc.decodePassword( nc.getGatewayPassword() ) ); model.setGatewayUrl( nc.getGatewayUrl() ); model.setGatewayUsername( nc.getGatewayUsername() ); model.setSecurityType( SECURITY_TYPE.NONE.getValue() ); if ( nc.isUseGateway() ) { model.setSecurityType( SECURITY_TYPE.KNOX.getValue() ); } else { resolveKerberosSecurity( model, nc ); } model.setSiteFiles( nc.getSiteFiles().stream() .map( sf -> new SimpleImmutableEntry<>( NAME_KEY, sf.getSiteFileName() ) ) .collect( Collectors.toList() ) ); break; } } } catch ( MetaStoreException e ) { log.logError( e.getMessage() ); } return model; }
HadoopClusterManager implements RuntimeTestProgressCallback { public ThinNameClusterModel getNamedCluster( String namedCluster ) { ThinNameClusterModel model = null; try { List<NamedCluster> namedClusters = namedClusterService.list( metaStore ); for ( NamedCluster nc : namedClusters ) { if ( nc.getName().equalsIgnoreCase( namedCluster ) ) { model = new ThinNameClusterModel(); model.setName( nc.getName() ); model.setHdfsHost( nc.getHdfsHost() ); model.setHdfsUsername( nc.getHdfsUsername() ); model.setHdfsPassword( nc.decodePassword( nc.getHdfsPassword() ) ); model.setHdfsPort( nc.getHdfsPort() ); model.setJobTrackerHost( nc.getJobTrackerHost() ); model.setJobTrackerPort( nc.getJobTrackerPort() ); model.setKafkaBootstrapServers( nc.getKafkaBootstrapServers() ); model.setOozieUrl( nc.getOozieUrl() ); model.setZooKeeperPort( nc.getZooKeeperPort() ); model.setZooKeeperHost( nc.getZooKeeperHost() ); resolveShimVendorAndVersion( model, nc.getShimIdentifier() ); model.setGatewayPassword( nc.decodePassword( nc.getGatewayPassword() ) ); model.setGatewayUrl( nc.getGatewayUrl() ); model.setGatewayUsername( nc.getGatewayUsername() ); model.setSecurityType( SECURITY_TYPE.NONE.getValue() ); if ( nc.isUseGateway() ) { model.setSecurityType( SECURITY_TYPE.KNOX.getValue() ); } else { resolveKerberosSecurity( model, nc ); } model.setSiteFiles( nc.getSiteFiles().stream() .map( sf -> new SimpleImmutableEntry<>( NAME_KEY, sf.getSiteFileName() ) ) .collect( Collectors.toList() ) ); break; } } } catch ( MetaStoreException e ) { log.logError( e.getMessage() ); } return model; } }
HadoopClusterManager implements RuntimeTestProgressCallback { public ThinNameClusterModel getNamedCluster( String namedCluster ) { ThinNameClusterModel model = null; try { List<NamedCluster> namedClusters = namedClusterService.list( metaStore ); for ( NamedCluster nc : namedClusters ) { if ( nc.getName().equalsIgnoreCase( namedCluster ) ) { model = new ThinNameClusterModel(); model.setName( nc.getName() ); model.setHdfsHost( nc.getHdfsHost() ); model.setHdfsUsername( nc.getHdfsUsername() ); model.setHdfsPassword( nc.decodePassword( nc.getHdfsPassword() ) ); model.setHdfsPort( nc.getHdfsPort() ); model.setJobTrackerHost( nc.getJobTrackerHost() ); model.setJobTrackerPort( nc.getJobTrackerPort() ); model.setKafkaBootstrapServers( nc.getKafkaBootstrapServers() ); model.setOozieUrl( nc.getOozieUrl() ); model.setZooKeeperPort( nc.getZooKeeperPort() ); model.setZooKeeperHost( nc.getZooKeeperHost() ); resolveShimVendorAndVersion( model, nc.getShimIdentifier() ); model.setGatewayPassword( nc.decodePassword( nc.getGatewayPassword() ) ); model.setGatewayUrl( nc.getGatewayUrl() ); model.setGatewayUsername( nc.getGatewayUsername() ); model.setSecurityType( SECURITY_TYPE.NONE.getValue() ); if ( nc.isUseGateway() ) { model.setSecurityType( SECURITY_TYPE.KNOX.getValue() ); } else { resolveKerberosSecurity( model, nc ); } model.setSiteFiles( nc.getSiteFiles().stream() .map( sf -> new SimpleImmutableEntry<>( NAME_KEY, sf.getSiteFileName() ) ) .collect( Collectors.toList() ) ); break; } } } catch ( MetaStoreException e ) { log.logError( e.getMessage() ); } return model; } HadoopClusterManager( Spoon spoon, NamedClusterService namedClusterService, IMetaStore metaStore,
                               String internalShim ); }
HadoopClusterManager implements RuntimeTestProgressCallback { public ThinNameClusterModel getNamedCluster( String namedCluster ) { ThinNameClusterModel model = null; try { List<NamedCluster> namedClusters = namedClusterService.list( metaStore ); for ( NamedCluster nc : namedClusters ) { if ( nc.getName().equalsIgnoreCase( namedCluster ) ) { model = new ThinNameClusterModel(); model.setName( nc.getName() ); model.setHdfsHost( nc.getHdfsHost() ); model.setHdfsUsername( nc.getHdfsUsername() ); model.setHdfsPassword( nc.decodePassword( nc.getHdfsPassword() ) ); model.setHdfsPort( nc.getHdfsPort() ); model.setJobTrackerHost( nc.getJobTrackerHost() ); model.setJobTrackerPort( nc.getJobTrackerPort() ); model.setKafkaBootstrapServers( nc.getKafkaBootstrapServers() ); model.setOozieUrl( nc.getOozieUrl() ); model.setZooKeeperPort( nc.getZooKeeperPort() ); model.setZooKeeperHost( nc.getZooKeeperHost() ); resolveShimVendorAndVersion( model, nc.getShimIdentifier() ); model.setGatewayPassword( nc.decodePassword( nc.getGatewayPassword() ) ); model.setGatewayUrl( nc.getGatewayUrl() ); model.setGatewayUsername( nc.getGatewayUsername() ); model.setSecurityType( SECURITY_TYPE.NONE.getValue() ); if ( nc.isUseGateway() ) { model.setSecurityType( SECURITY_TYPE.KNOX.getValue() ); } else { resolveKerberosSecurity( model, nc ); } model.setSiteFiles( nc.getSiteFiles().stream() .map( sf -> new SimpleImmutableEntry<>( NAME_KEY, sf.getSiteFileName() ) ) .collect( Collectors.toList() ) ); break; } } } catch ( MetaStoreException e ) { log.logError( e.getMessage() ); } return model; } 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 ); }
HadoopClusterManager implements RuntimeTestProgressCallback { public ThinNameClusterModel getNamedCluster( String namedCluster ) { ThinNameClusterModel model = null; try { List<NamedCluster> namedClusters = namedClusterService.list( metaStore ); for ( NamedCluster nc : namedClusters ) { if ( nc.getName().equalsIgnoreCase( namedCluster ) ) { model = new ThinNameClusterModel(); model.setName( nc.getName() ); model.setHdfsHost( nc.getHdfsHost() ); model.setHdfsUsername( nc.getHdfsUsername() ); model.setHdfsPassword( nc.decodePassword( nc.getHdfsPassword() ) ); model.setHdfsPort( nc.getHdfsPort() ); model.setJobTrackerHost( nc.getJobTrackerHost() ); model.setJobTrackerPort( nc.getJobTrackerPort() ); model.setKafkaBootstrapServers( nc.getKafkaBootstrapServers() ); model.setOozieUrl( nc.getOozieUrl() ); model.setZooKeeperPort( nc.getZooKeeperPort() ); model.setZooKeeperHost( nc.getZooKeeperHost() ); resolveShimVendorAndVersion( model, nc.getShimIdentifier() ); model.setGatewayPassword( nc.decodePassword( nc.getGatewayPassword() ) ); model.setGatewayUrl( nc.getGatewayUrl() ); model.setGatewayUsername( nc.getGatewayUsername() ); model.setSecurityType( SECURITY_TYPE.NONE.getValue() ); if ( nc.isUseGateway() ) { model.setSecurityType( SECURITY_TYPE.KNOX.getValue() ); } else { resolveKerberosSecurity( model, nc ); } model.setSiteFiles( nc.getSiteFiles().stream() .map( sf -> new SimpleImmutableEntry<>( NAME_KEY, sf.getSiteFileName() ) ) .collect( Collectors.toList() ) ); break; } } } catch ( MetaStoreException e ) { log.logError( e.getMessage() ); } return model; } 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; }