/** * Please use getBroadcastAddress instead. You need this only when you have to listen/connect. */ public static InetAddress getLocalAddress() { if (localInetAddress == null) try { localInetAddress = DatabaseDescriptor.getListenAddress() == null ? InetAddress.getLocalHost() : DatabaseDescriptor.getListenAddress(); } catch (UnknownHostException e) { throw new RuntimeException(e); } return localInetAddress; }
/** * Please use getBroadcastAddress instead. You need this only when you have to listen/connect. */ public static InetAddress getLocalAddress() { if (localInetAddress == null) try { localInetAddress = DatabaseDescriptor.getListenAddress() == null ? InetAddress.getLocalHost() : DatabaseDescriptor.getListenAddress(); } catch (UnknownHostException e) { throw new RuntimeException(e); } return localInetAddress; }
/** * Please use getBroadcastAddress instead. You need this only when you have to listen/connect. */ public static InetAddress getLocalAddress() { if (localInetAddress == null) try { localInetAddress = DatabaseDescriptor.getListenAddress() == null ? InetAddress.getLocalHost() : DatabaseDescriptor.getListenAddress(); } catch (UnknownHostException e) { throw new RuntimeException(e); } return localInetAddress; }
/** * Please use getBroadcastAddress instead. You need this only when you have to listen/connect. */ public static InetAddress getLocalAddress() { if (localInetAddress == null) try { localInetAddress = DatabaseDescriptor.getListenAddress() == null ? InetAddress.getLocalHost() : DatabaseDescriptor.getListenAddress(); } catch (UnknownHostException e) { throw new RuntimeException(e); } return localInetAddress; }
/** * Please use getBroadcastAddress instead. You need this only when you have to listen/connect. */ public static InetAddress getLocalAddress() { if (localInetAddress == null) try { localInetAddress = DatabaseDescriptor.getListenAddress() == null ? InetAddress.getLocalHost() : DatabaseDescriptor.getListenAddress(); } catch (UnknownHostException e) { throw new RuntimeException(e); } return localInetAddress; }
public Settings nodeSettings(Settings settings) { return Settings.builder() // overloadable settings from elasticsearch.yml // by default, HTTP is bound to C* rpc address, Transport is bound to C* internal listen address. .put("network.bind_host", DatabaseDescriptor.getRpcAddress().getHostAddress()) .put("network.publish_host", FBUtilities.getBroadcastRpcAddress().getHostAddress()) .put("transport.bind_host", FBUtilities.getLocalAddress().getHostAddress()) .put("transport.publish_host", FBUtilities.getBroadcastAddress().getHostAddress()) .put("path.data",getElasticsearchDataDir()) .put(settings) // not overloadable settings. .put("discovery.type","cassandra") .put("node.data",true) .put("node.master",true) .put("node.name", CassandraDiscovery.buildNodeName(DatabaseDescriptor.getListenAddress())) .put("node.attr.dc", DatabaseDescriptor.getLocalDataCenter()) .put("node.attr.rack", DatabaseDescriptor.getEndpointSnitch().getRack(FBUtilities.getBroadcastAddress())) .put("cluster.name", ClusterService.getElasticsearchClusterName(env.settings())) .build(); }