@Test public void testUpdateNamedClusterTemplate() { namedClusterManager.getClusterTemplate(); namedClusterManager.updateNamedClusterTemplate( "testHostName", 9999, true ); assertEquals( "testHostName", namedClusterManager.getClusterTemplate().getHdfsHost() ); assertEquals( "9999", namedClusterManager.getClusterTemplate().getHdfsPort() ); assertTrue( namedClusterManager.getClusterTemplate().isMapr() ); }
@Override public void updateNamedClusterTemplate( String hostName, int port, boolean isMapr ) { if ( clusterTemplate == null ) { getClusterTemplate(); } clusterTemplate.setHdfsHost( hostName ); if ( port > 0 ) { clusterTemplate.setHdfsPort( String.valueOf( port ) ); } else { clusterTemplate.setHdfsPort( "" ); } clusterTemplate.setMapr( isMapr ); }
NamedClusterManager implements NamedClusterService { @Override public void updateNamedClusterTemplate( String hostName, int port, boolean isMapr ) { if ( clusterTemplate == null ) { getClusterTemplate(); } clusterTemplate.setHdfsHost( hostName ); if ( port > 0 ) { clusterTemplate.setHdfsPort( String.valueOf( port ) ); } else { clusterTemplate.setHdfsPort( "" ); } clusterTemplate.setMapr( isMapr ); } }
NamedClusterManager implements NamedClusterService { @Override public void updateNamedClusterTemplate( String hostName, int port, boolean isMapr ) { if ( clusterTemplate == null ) { getClusterTemplate(); } clusterTemplate.setHdfsHost( hostName ); if ( port > 0 ) { clusterTemplate.setHdfsPort( String.valueOf( port ) ); } else { clusterTemplate.setHdfsPort( "" ); } clusterTemplate.setMapr( isMapr ); }  }
NamedClusterManager implements NamedClusterService { @Override public void updateNamedClusterTemplate( String hostName, int port, boolean isMapr ) { if ( clusterTemplate == null ) { getClusterTemplate(); } clusterTemplate.setHdfsHost( hostName ); if ( port > 0 ) { clusterTemplate.setHdfsPort( String.valueOf( port ) ); } else { clusterTemplate.setHdfsPort( "" ); } clusterTemplate.setMapr( isMapr ); }  BundleContext getBundleContext(); void setBundleContext( BundleContext bundleContext ); @Override void close( IMetaStore metastore ); @Override NamedCluster getClusterTemplate(); @Override void setClusterTemplate( NamedCluster clusterTemplate ); @Override void create( NamedCluster namedCluster, IMetaStore metastore ); @Override NamedCluster read( String clusterName, IMetaStore metastore ); @Override void update( NamedCluster namedCluster, IMetaStore metastore ); @Override void delete( String clusterName, IMetaStore metastore ); @Override List<NamedCluster> list( IMetaStore metastore ); @Override List<NamedCluster> list( IMetaStore metastore, List<MetaStoreException> exceptionList ); @Override List<String> listNames( IMetaStore metastore ); @Override boolean contains( String clusterName, IMetaStore metastore ); @Override NamedCluster getNamedClusterByName( String namedClusterName, IMetaStore metastore ); Map<String, Object> getProperties(); @Override NamedCluster getNamedClusterByHost( String hostName, IMetaStore metastore ); @Override void updateNamedClusterTemplate( String hostName, int port, boolean isMapr ); }
NamedClusterManager implements NamedClusterService { @Override public void updateNamedClusterTemplate( String hostName, int port, boolean isMapr ) { if ( clusterTemplate == null ) { getClusterTemplate(); } clusterTemplate.setHdfsHost( hostName ); if ( port > 0 ) { clusterTemplate.setHdfsPort( String.valueOf( port ) ); } else { clusterTemplate.setHdfsPort( "" ); } clusterTemplate.setMapr( isMapr ); }  BundleContext getBundleContext(); void setBundleContext( BundleContext bundleContext ); @Override void close( IMetaStore metastore ); @Override NamedCluster getClusterTemplate(); @Override void setClusterTemplate( NamedCluster clusterTemplate ); @Override void create( NamedCluster namedCluster, IMetaStore metastore ); @Override NamedCluster read( String clusterName, IMetaStore metastore ); @Override void update( NamedCluster namedCluster, IMetaStore metastore ); @Override void delete( String clusterName, IMetaStore metastore ); @Override List<NamedCluster> list( IMetaStore metastore ); @Override List<NamedCluster> list( IMetaStore metastore, List<MetaStoreException> exceptionList ); @Override List<String> listNames( IMetaStore metastore ); @Override boolean contains( String clusterName, IMetaStore metastore ); @Override NamedCluster getNamedClusterByName( String namedClusterName, IMetaStore metastore ); Map<String, Object> getProperties(); @Override NamedCluster getNamedClusterByHost( String hostName, IMetaStore metastore ); @Override void updateNamedClusterTemplate( String hostName, int port, boolean isMapr ); static final String BIG_DATA_SLAVE_METASTORE_DIR; }