You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by vi...@apache.org on 2012/01/12 20:04:39 UTC

svn commit: r1230707 - in /incubator/accumulo/trunk: ./ src/core/ src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloFileOutputFormat.java src/server/

Author: vines
Date: Thu Jan 12 19:04:38 2012
New Revision: 1230707

URL: http://svn.apache.org/viewvc?rev=1230707&view=rev
Log:
Accumulo-310 - merging

Modified:
    incubator/accumulo/trunk/   (props changed)
    incubator/accumulo/trunk/src/core/   (props changed)
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloFileOutputFormat.java
    incubator/accumulo/trunk/src/server/   (props changed)

Propchange: incubator/accumulo/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jan 12 19:04:38 2012
@@ -1,3 +1,3 @@
 /incubator/accumulo/branches/1.3:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124,1209526,1209532,1209539,1209541,1209587,1209657,1210518,1210571,1210596,1210598,1213424,1214320,1225006,1227215,1227231,1227611,1228195,1230180
 /incubator/accumulo/branches/1.3.5rc:1209938
-/incubator/accumulo/branches/1.4:1201902-1230701
+/incubator/accumulo/branches/1.4:1201902-1230701,1230706

Propchange: incubator/accumulo/trunk/src/core/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jan 12 19:04:38 2012
@@ -1,3 +1,3 @@
 /incubator/accumulo/branches/1.3/src/core:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124,1209526,1209532,1209539,1209541,1209587,1209657,1210518,1210571,1210596,1210598,1213424,1214320,1225006,1227215
 /incubator/accumulo/branches/1.3.5rc/src/core:1209938
-/incubator/accumulo/branches/1.4/src/core:1201902-1230701
+/incubator/accumulo/branches/1.4/src/core:1201902-1230701,1230706

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloFileOutputFormat.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloFileOutputFormat.java?rev=1230707&r1=1230706&r2=1230707&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloFileOutputFormat.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloFileOutputFormat.java Thu Jan 12 19:04:38 2012
@@ -87,28 +87,48 @@ public class AccumuloFileOutputFormat ex
     };
   }
   
+  /**
+   * @deprecated Use {@link #handleBlockSize(Configuration)} instead
+   */
   protected static void handleBlockSize(JobContext job) {
-    Configuration conf = job.getConfiguration();
+    handleBlockSize(job.getConfiguration());
+  }
+
+  protected static void handleBlockSize(Configuration conf) {
     int blockSize;
     if (conf.getBoolean(INSTANCE_HAS_BEEN_SET, false)) {
-      blockSize = (int) getInstance(job).getConfiguration().getMemoryInBytes(Property.TABLE_FILE_COMPRESSED_BLOCK_SIZE);
+      blockSize = (int) getInstance(conf).getConfiguration().getMemoryInBytes(Property.TABLE_FILE_COMPRESSED_BLOCK_SIZE);
     } else {
-      blockSize = getBlockSize(job);
+      blockSize = getBlockSize(conf);
     }
     conf.setInt("io.seqfile.compress.blocksize", blockSize);
     
   }
   
+  /**
+   * @deprecated Use {@link #setFileType(Configuration,String)} instead
+   */
   public static void setFileType(JobContext job, String type) {
-    job.getConfiguration().set(FILE_TYPE, type);
+    setFileType(job.getConfiguration(), type);
+  }
+
+  public static void setFileType(Configuration conf, String type) {
+    conf.set(FILE_TYPE, type);
   }
   
+  /**
+   * @deprecated Use {@link #setBlockSize(Configuration,int)} instead
+   */
   public static void setBlockSize(JobContext job, int blockSize) {
-    job.getConfiguration().setInt(BLOCK_SIZE, blockSize);
+    setBlockSize(job.getConfiguration(), blockSize);
+  }
+
+  public static void setBlockSize(Configuration conf, int blockSize) {
+    conf.setInt(BLOCK_SIZE, blockSize);
   }
   
-  private static int getBlockSize(JobContext job) {
-    return job.getConfiguration().getInt(BLOCK_SIZE,
+  private static int getBlockSize(Configuration conf) {
+    return conf.getInt(BLOCK_SIZE,
         (int) AccumuloConfiguration.getDefaultConfiguration().getMemoryInBytes(Property.TABLE_FILE_COMPRESSED_BLOCK_SIZE));
   }
   
@@ -117,10 +137,20 @@ public class AccumuloFileOutputFormat ex
    * @param job
    * @param instanceName
    * @param zooKeepers
-   * @deprecated since 1.4, use {@link #setBlockSize(JobContext, int)} to set block size no other configurations are used by OutputFormat
+   * @deprecated since 1.4, use {@link #setBlockSize(Configuration, int)} to set block size no other configurations are used by OutputFormat
    */
   public static void setZooKeeperInstance(JobContext job, String instanceName, String zooKeepers) {
-    Configuration conf = job.getConfiguration();
+    setZooKeeperInstance(job.getConfiguration(), instanceName, zooKeepers);
+  }
+
+  /**
+   * 
+   * @param conf
+   * @param instanceName
+   * @param zooKeepers
+   * @deprecated since 1.4, use {@link #setBlockSize(Configuration, int)} to set block size no other configurations are used by OutputFormat
+   */
+  public static void setZooKeeperInstance(Configuration conf, String instanceName, String zooKeepers) {
     if (conf.getBoolean(INSTANCE_HAS_BEEN_SET, false))
       throw new IllegalStateException("Instance info can only be set once per job");
     conf.setBoolean(INSTANCE_HAS_BEEN_SET, true);
@@ -135,10 +165,20 @@ public class AccumuloFileOutputFormat ex
    * @param job
    * @return
    * 
-   * @deprecated since 1.4, use {@link #setBlockSize(JobContext, int)} no other configurations are used by OutputFormat
+   * @deprecated since 1.4, use {@link #setBlockSize(Configuration, int)} no other configurations are used by OutputFormat
    */
   protected static Instance getInstance(JobContext job) {
-    Configuration conf = job.getConfiguration();
+    return getInstance(job.getConfiguration());
+  }
+  
+  /**
+   * 
+   * @param conf
+   * @return
+   * 
+   * @deprecated since 1.4, use {@link #setBlockSize(Configuration, int)} no other configurations are used by OutputFormat
+   */
+  protected static Instance getInstance(Configuration conf) {
     return new ZooKeeperInstance(conf.get(INSTANCE_NAME), conf.get(ZOOKEEPERS));
   }
 }

Propchange: incubator/accumulo/trunk/src/server/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jan 12 19:04:38 2012
@@ -1,3 +1,3 @@
 /incubator/accumulo/branches/1.3/src/server:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124,1209526,1209532,1209539,1209541,1209587,1209657,1210518,1210571,1210596,1210598,1213424,1214320,1225006,1227215,1227231,1227611
 /incubator/accumulo/branches/1.3.5rc/src/server:1209938
-/incubator/accumulo/branches/1.4/src/server:1201902-1230701
+/incubator/accumulo/branches/1.4/src/server:1201902-1230701,1230706