mirror of https://github.com/apache/cassandra
Revert "configurable ListenAddress setting" since it prevents server from starting.
This reverts commit 1304a9d9e1f9f85b991d99a1ca96e02505eb430f. git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@767205 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fb0e28d664
commit
807b89ed7c
|
|
@ -14,7 +14,6 @@
|
|||
<RpcTimeoutInMillis>5000</RpcTimeoutInMillis>
|
||||
<JobTrackerHost>tdsearch001.sf2p.facebook.com</JobTrackerHost>
|
||||
<JobJarFileLocation>C:\Engagements\Cassandra-Nexus</JobJarFileLocation>
|
||||
<ListenAddress>127.0.0.1</ListenAddress>
|
||||
<StoragePort>7000</StoragePort>
|
||||
<ControlPort>7001</ControlPort>
|
||||
<ThriftPort>9160</ThriftPort>
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@ public class DatabaseDescriptor
|
|||
private static int controlPort_ = 7001;
|
||||
private static int httpPort_ = 7002;
|
||||
private static int thriftPort_ = 9160;
|
||||
private static String listenAddress_ = "localhost";
|
||||
private static String clusterName_ = "Test";
|
||||
private static int replicationFactor_ = 3;
|
||||
private static long rpcTimeoutInMillis_ = 2000;
|
||||
|
|
@ -177,11 +176,6 @@ public class DatabaseDescriptor
|
|||
if ( port != null )
|
||||
storagePort_ = Integer.parseInt(port);
|
||||
|
||||
/* Local IP or hostname to bind services to */
|
||||
String listenAddress = xmlUtils.getNodeValue("/Storage/ListenAddress");
|
||||
if ( listenAddress != null)
|
||||
listenAddress_ = listenAddress;
|
||||
|
||||
/* UDP port for control messages */
|
||||
port = xmlUtils.getNodeValue("/Storage/ControlPort");
|
||||
if ( port != null )
|
||||
|
|
@ -806,9 +800,4 @@ public class DatabaseDescriptor
|
|||
super(message);
|
||||
}
|
||||
}
|
||||
|
||||
public static String getListenAddress()
|
||||
{
|
||||
return listenAddress_;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ import java.util.Map;
|
|||
import org.apache.cassandra.utils.FBUtilities;
|
||||
import org.apache.cassandra.utils.LogUtil;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.cassandra.config.DatabaseDescriptor;
|
||||
|
||||
/**
|
||||
* Author : Avinash Lakshman ( alakshman@facebook.com) & Prashant Malik ( pmalik@facebook.com )
|
||||
|
|
@ -81,14 +80,7 @@ public class EndPoint implements Serializable, Comparable<EndPoint>
|
|||
{
|
||||
try
|
||||
{
|
||||
if(DatabaseDescriptor.getListenAddress() != null)
|
||||
{
|
||||
host_ = DatabaseDescriptor.getListenAddress();
|
||||
}
|
||||
else
|
||||
{
|
||||
host_ = FBUtilities.getHostName();
|
||||
}
|
||||
host_ = FBUtilities.getHostName();
|
||||
port_ = port;
|
||||
}
|
||||
catch (UnknownHostException e)
|
||||
|
|
|
|||
|
|
@ -20,9 +20,6 @@ package org.apache.cassandra.service;
|
|||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.ServerSocket;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.InetAddress;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.thrift.protocol.TBinaryProtocol;
|
||||
|
|
@ -68,22 +65,7 @@ public class CassandraDaemon
|
|||
Cassandra.Processor processor = new Cassandra.Processor(peerStorageServer);
|
||||
|
||||
// Transport
|
||||
TServerSocket tServerSocket = null;
|
||||
try
|
||||
{
|
||||
// Make server socket
|
||||
ServerSocket serverSocket = new ServerSocket();
|
||||
// Prevent 2MSL delay problem on server restarts
|
||||
serverSocket.setReuseAddress(true);
|
||||
// Bind to listening port
|
||||
serverSocket.bind(new InetSocketAddress(DatabaseDescriptor.getListenAddress(), listenPort));
|
||||
tServerSocket = new TServerSocket(serverSocket);
|
||||
}
|
||||
catch (IOException ioe)
|
||||
{
|
||||
throw new TTransportException("Could not create ServerSocket on address "
|
||||
+ DatabaseDescriptor.getListenAddress() + ".");
|
||||
}
|
||||
TServerSocket tServerSocket = new TServerSocket(listenPort);
|
||||
|
||||
// Protocol factory
|
||||
TProtocolFactory tProtocolFactory = new TBinaryProtocol.Factory();
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@
|
|||
<RpcTimeoutInMillis>5000</RpcTimeoutInMillis>
|
||||
<JobTrackerHost>tdsearch001.sf2p.facebook.com</JobTrackerHost>
|
||||
<JobJarFileLocation>C:\Engagements\Cassandra-Nexus</JobJarFileLocation>
|
||||
<ListenAddress>127.0.0.1</ListenAddress>
|
||||
<StoragePort>7000</StoragePort>
|
||||
<ControlPort>7001</ControlPort>
|
||||
<ThriftPort>7001</ThriftPort>
|
||||
|
|
|
|||
Loading…
Reference in New Issue