Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

merge from 1.1

  • Loading branch information...
commit e19fa37d46ead3920b86341e46fc9b0140019a58 2 parents 4881221 + 6407cbc
Brandon Williams driftx authored
19 src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
@@ -85,8 +85,6 @@
85 85
86 86 private final static String DEFAULT_INPUT_FORMAT = "org.apache.cassandra.hadoop.ColumnFamilyInputFormat";
87 87 private final static String DEFAULT_OUTPUT_FORMAT = "org.apache.cassandra.hadoop.ColumnFamilyOutputFormat";
88   - private final static boolean DEFAULT_WIDEROW_INPUT = false;
89   - private final static boolean DEFAULT_USE_SECONDARY = false;
90 88
91 89 private final static String PARTITION_FILTER_SIGNATURE = "cassandra.partition.filter";
92 90
@@ -108,8 +106,8 @@
108 106 private String inputFormatClass;
109 107 private String outputFormatClass;
110 108 private int limit;
111   - private boolean widerows;
112   - private boolean usePartitionFilter;
  109 + private boolean widerows = false;
  110 + private boolean usePartitionFilter = false;
113 111 // wide row hacks
114 112 private ByteBuffer lastKey;
115 113 private Map<ByteBuffer,IColumn> lastRow;
@@ -576,12 +574,10 @@ public void setLocation(String location, Job job) throws IOException
576 574 SlicePredicate predicate = new SlicePredicate().setSlice_range(range);
577 575 ConfigHelper.setInputSlicePredicate(conf, predicate);
578 576 }
579   - widerows = DEFAULT_WIDEROW_INPUT;
580 577 if (System.getenv(PIG_WIDEROW_INPUT) != null)
581   - widerows = Boolean.parseBoolean(System.getProperty(PIG_WIDEROW_INPUT));
582   - usePartitionFilter = DEFAULT_USE_SECONDARY;
583   - if (System.getenv() != null)
584   - usePartitionFilter = Boolean.parseBoolean(System.getenv(PIG_USE_SECONDARY));
  578 + widerows = Boolean.valueOf(System.getenv(PIG_WIDEROW_INPUT));
  579 + if (System.getenv(PIG_USE_SECONDARY) != null)
  580 + usePartitionFilter = Boolean.valueOf(System.getenv(PIG_USE_SECONDARY));
585 581
586 582 if (usePartitionFilter && getIndexExpressions() != null)
587 583 ConfigHelper.setInputRange(conf, getIndexExpressions());
@@ -824,9 +820,8 @@ public void setStoreLocation(String location, Job job) throws IOException
824 820 throw new IOException("PIG_OUTPUT_PARTITIONER or PIG_PARTITIONER environment variable not set");
825 821
826 822 // we have to do this again here for the check in writeColumnsFromTuple
827   - usePartitionFilter = DEFAULT_USE_SECONDARY;
828   - if (System.getenv() != null)
829   - usePartitionFilter = Boolean.parseBoolean(System.getenv(PIG_USE_SECONDARY));
  823 + if (System.getenv(PIG_USE_SECONDARY) != null)
  824 + usePartitionFilter = Boolean.valueOf(System.getenv(PIG_USE_SECONDARY));
830 825
831 826 initSchema(storeSignature);
832 827 }

0 comments on commit e19fa37

Please sign in to comment.
Something went wrong with that request. Please try again.