@Test public void testNamedClusterKnoxSecurity() { ThinNameClusterModel model = new ThinNameClusterModel(); model.setName( knoxNC ); model.setSecurityType( "Knox" ); model.setGatewayUsername( "username" ); model.setGatewayUrl( "http: model.setGatewayPassword( "password" ); hadoopClusterManager.createNamedCluster( model, getFiles( "/" ) ); NamedCluster namedCluster = namedClusterService.getNamedClusterByName( knoxNC, metaStore ); assertEquals( true, namedCluster.isUseGateway() ); assertEquals( "password", namedCluster.getGatewayPassword() ); assertEquals( "http: assertEquals( "username", namedCluster.getGatewayUsername() ); }
public JSONObject createNamedCluster( ThinNameClusterModel model, Map<String, CachedFileItemStream> siteFilesSource ) { JSONObject response = new JSONObject(); response.put( NAMED_CLUSTER, "" ); try { NamedCluster nc = convertToNamedCluster( model ); installSiteFiles( siteFilesSource, nc ); namedClusterService.create( nc, metaStore ); deleteConfigFolder( nc.getName() ); createConfigProperties( nc ); setupKerberosSecurity( model, siteFilesSource, "", "" ); response.put( NAMED_CLUSTER, nc.getName() ); } catch ( Exception e ) { log.logError( e.getMessage() ); } return response; }
HadoopClusterManager implements RuntimeTestProgressCallback { public JSONObject createNamedCluster( ThinNameClusterModel model, Map<String, CachedFileItemStream> siteFilesSource ) { JSONObject response = new JSONObject(); response.put( NAMED_CLUSTER, "" ); try { NamedCluster nc = convertToNamedCluster( model ); installSiteFiles( siteFilesSource, nc ); namedClusterService.create( nc, metaStore ); deleteConfigFolder( nc.getName() ); createConfigProperties( nc ); setupKerberosSecurity( model, siteFilesSource, "", "" ); response.put( NAMED_CLUSTER, nc.getName() ); } catch ( Exception e ) { log.logError( e.getMessage() ); } return response; } }
HadoopClusterManager implements RuntimeTestProgressCallback { public JSONObject createNamedCluster( ThinNameClusterModel model, Map<String, CachedFileItemStream> siteFilesSource ) { JSONObject response = new JSONObject(); response.put( NAMED_CLUSTER, "" ); try { NamedCluster nc = convertToNamedCluster( model ); installSiteFiles( siteFilesSource, nc ); namedClusterService.create( nc, metaStore ); deleteConfigFolder( nc.getName() ); createConfigProperties( nc ); setupKerberosSecurity( model, siteFilesSource, "", "" ); response.put( NAMED_CLUSTER, nc.getName() ); } catch ( Exception e ) { log.logError( e.getMessage() ); } return response; } HadoopClusterManager( Spoon spoon, NamedClusterService namedClusterService, IMetaStore metaStore,
                               String internalShim ); }
HadoopClusterManager implements RuntimeTestProgressCallback { public JSONObject createNamedCluster( ThinNameClusterModel model, Map<String, CachedFileItemStream> siteFilesSource ) { JSONObject response = new JSONObject(); response.put( NAMED_CLUSTER, "" ); try { NamedCluster nc = convertToNamedCluster( model ); installSiteFiles( siteFilesSource, nc ); namedClusterService.create( nc, metaStore ); deleteConfigFolder( nc.getName() ); createConfigProperties( nc ); setupKerberosSecurity( model, siteFilesSource, "", "" ); response.put( NAMED_CLUSTER, nc.getName() ); } catch ( Exception e ) { log.logError( e.getMessage() ); } return response; } 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 JSONObject createNamedCluster( ThinNameClusterModel model, Map<String, CachedFileItemStream> siteFilesSource ) { JSONObject response = new JSONObject(); response.put( NAMED_CLUSTER, "" ); try { NamedCluster nc = convertToNamedCluster( model ); installSiteFiles( siteFilesSource, nc ); namedClusterService.create( nc, metaStore ); deleteConfigFolder( nc.getName() ); createConfigProperties( nc ); setupKerberosSecurity( model, siteFilesSource, "", "" ); response.put( NAMED_CLUSTER, nc.getName() ); } catch ( Exception e ) { log.logError( e.getMessage() ); } return response; } 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; }