You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by ga...@apache.org on 2011/05/04 19:29:08 UTC
svn commit: r1099532 - in /pig/trunk: CHANGES.txt
src/org/apache/pig/backend/hadoop/hbase/HBaseStorage.java
Author: gates
Date: Wed May 4 17:29:07 2011
New Revision: 1099532
URL: http://svn.apache.org/viewvc?rev=1099532&view=rev
Log:
PIG-2008: Cache outputFormat in HBaseStorage
Modified:
pig/trunk/CHANGES.txt
pig/trunk/src/org/apache/pig/backend/hadoop/hbase/HBaseStorage.java
Modified: pig/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1099532&r1=1099531&r2=1099532&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Wed May 4 17:29:07 2011
@@ -30,6 +30,8 @@ PIG-2011: Speed up TestTypedMap.java (dv
BUG FIXES
+PIG-2008: Cache outputFormat in HBaseStorage (thedatachef via gates)
+
PIG-2025: org.apache.pig.test.udf.evalfunc.TOMAP is missing package
declaration (azaroth via gates)
Modified: pig/trunk/src/org/apache/pig/backend/hadoop/hbase/HBaseStorage.java
URL: http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/backend/hadoop/hbase/HBaseStorage.java?rev=1099532&r1=1099531&r2=1099532&view=diff
==============================================================================
--- pig/trunk/src/org/apache/pig/backend/hadoop/hbase/HBaseStorage.java (original)
+++ pig/trunk/src/org/apache/pig/backend/hadoop/hbase/HBaseStorage.java Wed May 4 17:29:07 2011
@@ -134,6 +134,7 @@ public class HBaseStorage extends LoadFu
private Configuration m_conf;
private RecordReader reader;
private RecordWriter writer;
+ private TableOutputFormat outputFormat = null;
private Scan scan;
private String contextSignature = null;
@@ -509,9 +510,11 @@ public class HBaseStorage extends LoadFu
@Override
public OutputFormat getOutputFormat() throws IOException {
- TableOutputFormat outputFormat = new TableOutputFormat();
- HBaseConfiguration.addHbaseResources(m_conf);
- outputFormat.setConf(m_conf);
+ if (outputFormat == null) {
+ this.outputFormat = new TableOutputFormat();
+ HBaseConfiguration.addHbaseResources(m_conf);
+ this.outputFormat.setConf(m_conf);
+ }
return outputFormat;
}