Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/java/org/apache/cassandra/hadoop/ColumnFamilyInputFormat.java b/src/java/org/apache/cassandra/hadoop/ColumnFamilyInputFormat.java
- index 97b6753..a64af73 100644
- --- a/src/java/org/apache/cassandra/hadoop/ColumnFamilyInputFormat.java
- +++ b/src/java/org/apache/cassandra/hadoop/ColumnFamilyInputFormat.java
- @@ -152,6 +152,11 @@ public class ColumnFamilyInputFormat extends InputFormat<ByteBuffer, SortedMap<B
- ArrayList<InputSplit> splits = new ArrayList<InputSplit>();
- List<String> tokens = getSubSplits(keyspace, cfName, range, conf);
- + if(tokens.size() == 0)
- + {
- + return splits;
- + }
- +
- // turn the sub-ranges into InputSplits
- String[] endpoints = range.endpoints.toArray(new String[range.endpoints.size()]);
- // hadoop needs hostname, not ip
- @@ -194,7 +199,8 @@ public class ColumnFamilyInputFormat extends InputFormat<ByteBuffer, SortedMap<B
- throw new RuntimeException(e);
- }
- }
- - throw new IOException("failed connecting to all endpoints " + StringUtils.join(range.endpoints, ","));
- + logger.debug("failed connecting to all endpoints " + StringUtils.join(range.endpoints, ","));
- + return new ArrayList<String>();
- }
- private static Cassandra.Client createConnection(String host, Integer port, boolean framed) throws IOException
Advertisement
Add Comment
Please, Sign In to add comment