public void setPortForwardBindAddress(InetAddress bindAddress) { if (bindAddress == null) { bindAddress = Inet4Address.getLoopbackAddress(); } portForwardBindAddress = bindAddress; }
private InetAddress getProxyAddress() { return Inet4Address.getLoopbackAddress(); } }
public void setPortForwardBindAddress(InetAddress bindAddress) { if (bindAddress == null) { bindAddress = Inet4Address.getLoopbackAddress(); } portForwardBindAddress = bindAddress; }
private String getLocalhostName() { return Inet4Address.getLoopbackAddress().getHostAddress(); }
private String getLocalhostName() { return Inet4Address.getLoopbackAddress().getHostAddress(); }
public void bindToLocalhost() { bindToAddress(Inet4Address.getLoopbackAddress()); } }
public TestExecutor() { this(Inet4Address.getLoopbackAddress().getHostAddress(), 19002); }
@Inject public JanusGraphPluginCQL(IJanusGraphConfig config, JanusGraphBuilderCQLProvider builderProvider) { super(BACKEND, Optional.ofNullable(config.getStorageHostname()).orElse(Inet4Address.getLoopbackAddress().getHostAddress()), config.getStoragePort()); this.graphBuilder = builderProvider.getGraphBuilder(); this.useJanusgraphTransaction = config.useJanusgraphTransaction(); }
@Override public void init(final DataGenerator dataGenerator) throws Exception { this.dataGenerator = dataGenerator; logger.info("Initializing Geode Region"); EnvParser envParser = this.envParser; if(this.propertyFactory.getProperty(NdBenchConstants.DISCOVERY_ENV).asString("").get().equals(NdBenchConstants.DISCOVERY_ENV_CF)) { Properties props = new Properties(); props.setProperty(USER_NAME, envParser.getUsername()); props.setProperty(PASSWORD, envParser.getPasssword()); props.setProperty("security-client-auth-init", "com.netflix.ndbench.geode.plugin.ClientAuthInitialize.create"); ClientCacheFactory ccf = new ClientCacheFactory(props); List<URI> locatorList = envParser.getLocators(); for (URI locator : locatorList) { ccf.addPoolLocator(locator.getHost(), locator.getPort()); } clientCache = ccf.create(); }else{ clientCache = new ClientCacheFactory() .addPoolLocator(Inet4Address.getLoopbackAddress().getHostAddress(),55221) .create(); } sampleRegion = clientCache.<String, String>createClientRegionFactory(ClientRegionShortcut.PROXY).create(REGION); }
@Override public void init(final DataGenerator dataGenerator) throws Exception { this.dataGenerator = dataGenerator; logger.info("Initializing Geode Region"); EnvParser envParser = this.envParser; if(this.propertyFactory.getProperty(NdBenchConstants.DISCOVERY_ENV).asString("").get().equals(NdBenchConstants.DISCOVERY_ENV_CF)) { Properties props = new Properties(); props.setProperty(USER_NAME, envParser.getUsername()); props.setProperty(PASSWORD, envParser.getPasssword()); props.setProperty("security-client-auth-init", "com.netflix.ndbench.geode.plugin.ClientAuthInitialize.create"); ClientCacheFactory ccf = new ClientCacheFactory(props); List<URI> locatorList = envParser.getLocators(); for (URI locator : locatorList) { ccf.addPoolLocator(locator.getHost(), locator.getPort()); } clientCache = ccf.create(); }else{ clientCache = new ClientCacheFactory() .addPoolLocator(Inet4Address.getLoopbackAddress().getHostAddress(),55221) .create(); } sampleRegion = clientCache.<String, String>createClientRegionFactory(ClientRegionShortcut.PROXY).create(REGION); }
@Inject public JanusGraphBuilderCQLProvider(IJanusGraphConfig storageConfig, ICQLConfig config) { graphBuilder = JanusGraphFactory.build().set("storage.cql.keyspace", config.getKeyspace()) .set("storage.backend", "cql").set("storage.cql.cluster-name", config.getClusterName()) .set("storage.hostname", Optional.ofNullable(storageConfig.getStorageHostname()).orElse(Inet4Address.getLoopbackAddress().getHostAddress())) .set("storage.port", storageConfig.getStoragePort()).set("storage.lock.wait-time", 300) .set("cache.db-cache", false).set("query.batch", false).set("query.smart-limit", false) .set("query.force-index", false).set("query.fast-property", false); }
protected NCConfig createNCConfig(String ncName, ConfigManager configManager) { NCConfig ncConfig = new NCConfig(ncName, configManager); ncConfig.setClusterAddress("localhost"); ncConfig.setClusterPort(DEFAULT_HYRACKS_CC_CLUSTER_PORT); ncConfig.setClusterListenAddress(Inet4Address.getLoopbackAddress().getHostAddress()); ncConfig.setDataListenAddress(Inet4Address.getLoopbackAddress().getHostAddress()); ncConfig.setResultListenAddress(Inet4Address.getLoopbackAddress().getHostAddress()); ncConfig.setMessagingListenAddress(Inet4Address.getLoopbackAddress().getHostAddress()); ncConfig.setResultTTL(RESULT_TTL); ncConfig.setResultSweepThreshold(1000L); ncConfig.setVirtualNC(); configManager.set(ControllerConfig.Option.DEFAULT_DIR, joinPath(getDefaultStoragePath(), "asterixdb", ncName)); return ncConfig; }
protected CCConfig createCCConfig(ConfigManager configManager) throws IOException { CCConfig ccConfig = new CCConfig(configManager); ccConfig.setClusterListenAddress(Inet4Address.getLoopbackAddress().getHostAddress()); ccConfig.setClientListenAddress(Inet4Address.getLoopbackAddress().getHostAddress()); ccConfig.setClientListenPort(DEFAULT_HYRACKS_CC_CLIENT_PORT); ccConfig.setClusterListenPort(DEFAULT_HYRACKS_CC_CLUSTER_PORT); ccConfig.setResultTTL(RESULT_TTL); ccConfig.setResultSweepThreshold(1000L); ccConfig.setEnforceFrameWriterProtocol(true); configManager.set(ControllerConfig.Option.DEFAULT_DIR, joinPath(getDefaultStoragePath(), "asterixdb")); return ccConfig; }