cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [7/10] git commit: Fix missing import
Date Thu, 01 Mar 2012 16:40:19 GMT
Fix missing import


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/bc05b596
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/bc05b596
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/bc05b596

Branch: refs/heads/trunk
Commit: bc05b5960ac14e9412f81d7f4ca1cc04035ca60f
Parents: 2d6c872
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Thu Mar 1 10:39:47 2012 -0600
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Thu Mar 1 10:39:47 2012 -0600

----------------------------------------------------------------------
 src/java/org/apache/cassandra/cli/CliClient.java |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc05b596/src/java/org/apache/cassandra/cli/CliClient.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cli/CliClient.java b/src/java/org/apache/cassandra/cli/CliClient.java
index 1f54b5b..8e76b89 100644
--- a/src/java/org/apache/cassandra/cli/CliClient.java
+++ b/src/java/org/apache/cassandra/cli/CliClient.java
@@ -22,6 +22,8 @@ import java.io.InputStream;
 import java.io.PrintStream;
 import java.nio.ByteBuffer;
 import java.nio.charset.CharacterCodingException;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
 import java.util.*;
 
 import com.google.common.base.Predicate;
@@ -1154,8 +1156,14 @@ public class CliClient
             {
                 SimpleSnitch snitch = new SimpleSnitch();
                 Map<String, String> options = new HashMap<String, String>();
-                options.put(snitch.getDatacenter(InetAddress.getLocalHost()), "1");
-
+                try
+                {
+                    options.put(snitch.getDatacenter(InetAddress.getLocalHost()), "1");
+                }
+                catch (UnknownHostException e)
+                {
+                    throw new RuntimeException(e);
+                }
                 ksDef.setStrategy_options(options);
             }
         }


Mime
View raw message