private void startLocalSegmentStore ( int segmentStoreId ) throws Exception { Properties authProps = new Properties ( ) ; authProps . setProperty ( "pravega.client.auth.method" , "Default" ) ; authProps . setProperty ( "pravega.client.auth.userName" , "arvind" ) ; authProps . setProperty ( "pravega.client.auth.password" , "1111_aaaa" ) ; ServiceBuilderConfig . Builder configBuilder = ServiceBuilderConfig . builder ( ) . include ( System . getProperties ( ) ) . include ( authProps ) . include ( ServiceConfig . builder ( ) . with ( ServiceConfig . CONTAINER_COUNT , containerCount ) . with ( ServiceConfig . THREAD_POOL_SIZE , THREADPOOL_SIZE ) . with ( ServiceConfig . ZK_URL , "localhost:" + zkPort ) . with ( ServiceConfig . SECURE_ZK , this . secureZK ) . with ( ServiceConfig . ZK_TRUSTSTORE_LOCATION , jksTrustFile ) . with ( ServiceConfig . ZK_TRUST_STORE_PASSWORD_PATH , keyPasswordFile ) . with ( ServiceConfig . LISTENING_PORT , this . segmentStorePorts [ segmentStoreId ] ) . with ( ServiceConfig . CLUSTER_NAME , this . clusterName ) . with ( ServiceConfig . ENABLE_TLS , this . enableTls ) . with ( ServiceConfig . KEY_FILE , this . keyFile ) . with ( ServiceConfig . CERT_FILE , this . certFile ) . with ( ServiceConfig . CACHE_POLICY_MAX_TIME , 60 ) . with ( ServiceConfig . CACHE_POLICY_MAX_SIZE , 128 * 1024 * 1024L ) . with ( ServiceConfig . DATALOG_IMPLEMENTATION , isInMemStorage ? ServiceConfig . DataLogType . INMEMORY : ServiceConfig . DataLogType . BOOKKEEPER ) . with ( ServiceConfig . STORAGE_IMPLEMENTATION , isInMemStorage ? ServiceConfig . StorageType . INMEMORY : ServiceConfig . StorageType . FILESYSTEM ) ) . include ( DurableLogConfig . builder ( ) . with ( DurableLogConfig . CHECKPOINT_COMMIT_COUNT , 100 ) . with ( DurableLogConfig . CHECKPOINT_MIN_COMMIT_COUNT , 100 ) . with ( DurableLogConfig . CHECKPOINT_TOTAL_COMMIT_LENGTH , 100 * 1024 * 1024L ) ) . include ( AutoScalerConfig . builder ( ) . with ( AutoScalerConfig . CONTROLLER_URI , ( this . enableTls ? "tls" : "tcp" ) + "://localhost:" + controllerPorts [ 0 ] ) . with ( AutoScalerConfig . TOKEN_SIGNING_KEY , "secret" ) . with ( AutoScalerConfig . AUTH_ENABLED , this . enableAuth ) . with ( AutoScalerConfig . TLS_ENABLED , this . enableTls ) . with ( AutoScalerConfig . TLS_CERT_FILE , this . certFile ) . with ( AutoScalerConfig . VALIDATE_HOSTNAME , false ) ) . include ( MetricsConfig . builder ( ) . with ( MetricsConfig . ENABLE_STATISTICS , enableMetrics ) ) ; nodeServiceStarter [ segmentStoreId ] = new ServiceStarter ( configBuilder . build ( ) ) ; nodeServiceStarter [ segmentStoreId ] . start ( ) ; }
Starts a SegmentStore with the given id . This is re - entrant . Eventually this will allow starting and stopping of individual SegmentStore instances . This is not possible right now .