Permalink
Browse files

merge from 1.1

  • Loading branch information...
2 parents 4881221 + 6407cbc commit e19fa37d46ead3920b86341e46fc9b0140019a58 @driftx driftx committed Oct 12, 2012
Showing with 7 additions and 12 deletions.
  1. +7 −12 src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
@@ -85,8 +85,6 @@
private final static String DEFAULT_INPUT_FORMAT = "org.apache.cassandra.hadoop.ColumnFamilyInputFormat";
private final static String DEFAULT_OUTPUT_FORMAT = "org.apache.cassandra.hadoop.ColumnFamilyOutputFormat";
- private final static boolean DEFAULT_WIDEROW_INPUT = false;
- private final static boolean DEFAULT_USE_SECONDARY = false;
private final static String PARTITION_FILTER_SIGNATURE = "cassandra.partition.filter";
@@ -108,8 +106,8 @@
private String inputFormatClass;
private String outputFormatClass;
private int limit;
- private boolean widerows;
- private boolean usePartitionFilter;
+ private boolean widerows = false;
+ private boolean usePartitionFilter = false;
// wide row hacks
private ByteBuffer lastKey;
private Map<ByteBuffer,IColumn> lastRow;
@@ -576,12 +574,10 @@ public void setLocation(String location, Job job) throws IOException
SlicePredicate predicate = new SlicePredicate().setSlice_range(range);
ConfigHelper.setInputSlicePredicate(conf, predicate);
}
- widerows = DEFAULT_WIDEROW_INPUT;
if (System.getenv(PIG_WIDEROW_INPUT) != null)
- widerows = Boolean.parseBoolean(System.getProperty(PIG_WIDEROW_INPUT));
- usePartitionFilter = DEFAULT_USE_SECONDARY;
- if (System.getenv() != null)
- usePartitionFilter = Boolean.parseBoolean(System.getenv(PIG_USE_SECONDARY));
+ widerows = Boolean.valueOf(System.getenv(PIG_WIDEROW_INPUT));
+ if (System.getenv(PIG_USE_SECONDARY) != null)
+ usePartitionFilter = Boolean.valueOf(System.getenv(PIG_USE_SECONDARY));
if (usePartitionFilter && getIndexExpressions() != null)
ConfigHelper.setInputRange(conf, getIndexExpressions());
@@ -824,9 +820,8 @@ public void setStoreLocation(String location, Job job) throws IOException
throw new IOException("PIG_OUTPUT_PARTITIONER or PIG_PARTITIONER environment variable not set");
// we have to do this again here for the check in writeColumnsFromTuple
- usePartitionFilter = DEFAULT_USE_SECONDARY;
- if (System.getenv() != null)
- usePartitionFilter = Boolean.parseBoolean(System.getenv(PIG_USE_SECONDARY));
+ if (System.getenv(PIG_USE_SECONDARY) != null)
+ usePartitionFilter = Boolean.valueOf(System.getenv(PIG_USE_SECONDARY));
initSchema(storeSignature);
}

0 comments on commit e19fa37

Please sign in to comment.