Author: ctubbsii
Date: Thu May 16 16:11:41 2013
New Revision: 1483431

URL: http://svn.apache.org/r1483431
Log:
ACCUMULO-1413,ACCUMULO-1421 merge to trunk

Modified:
    accumulo/trunk/   (props changed)
    accumulo/trunk/README
    accumulo/trunk/assemble/   (props changed)
    accumulo/trunk/assemble/pom.xml
    accumulo/trunk/assemble/src/main/assemblies/binary-release.xml
    accumulo/trunk/core/   (props changed)
    accumulo/trunk/core/pom.xml
    
accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloFileOutputFormat.java
    
accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java
    
accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java
    
accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/TTimeoutTransport.java
    
accumulo/trunk/docs/src/main/latex/accumulo_user_manual/chapters/administration.tex
    accumulo/trunk/examples/   (props changed)
    accumulo/trunk/examples/pom.xml
    accumulo/trunk/fate/pom.xml
    accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java   
(props changed)
    
accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java
   (props changed)
    accumulo/trunk/pom.xml   (contents, props changed)
    accumulo/trunk/proxy/README   (props changed)
    accumulo/trunk/proxy/pom.xml
    accumulo/trunk/server/   (props changed)
    accumulo/trunk/server/pom.xml
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/Accumulo.java
    accumulo/trunk/src/   (props changed)
    accumulo/trunk/start/pom.xml
    accumulo/trunk/test/pom.xml
    accumulo/trunk/trace/pom.xml

Propchange: accumulo/trunk/
------------------------------------------------------------------------------
  Merged 
/accumulo/branches/1.5:r1481927-1481955,1481957-1482356,1482358-1482428,1482897-1483022,1483024-1483423

Modified: accumulo/trunk/README
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/README?rev=1483431&r1=1483430&r2=1483431&view=diff
==============================================================================
--- accumulo/trunk/README (original)
+++ accumulo/trunk/README Thu May 16 16:11:41 2013
@@ -44,7 +44,7 @@ easier to install.
 
 Copy the accumulo tar file produced by mvn package from the assemble/target/
 directory to the desired destination, then untar it (e.g. 
-tar xzf accumulo-assemble-1.6.0-bin.tar.gz).
+tar xzf accumulo-1.6.0-bin.tar.gz).
 
 If you are using the RPM, install the RPM on every machine that will run
 accumulo.

Propchange: accumulo/trunk/assemble/
------------------------------------------------------------------------------
  Merged 
/accumulo/branches/1.5/assemble:r1481250-1481853,1481855-1481955,1481957-1482428,1482897-1483022,1483024-1483423

Modified: accumulo/trunk/assemble/pom.xml
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/assemble/pom.xml?rev=1483431&r1=1483430&r2=1483431&view=diff
==============================================================================
--- accumulo/trunk/assemble/pom.xml (original)
+++ accumulo/trunk/assemble/pom.xml Thu May 16 16:11:41 2013
@@ -19,12 +19,12 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.accumulo</groupId>
-    <artifactId>accumulo</artifactId>
+    <artifactId>accumulo-project</artifactId>
     <version>1.6.0-SNAPSHOT</version>
   </parent>
-  <artifactId>accumulo-assemble</artifactId>
+  <artifactId>accumulo</artifactId>
   <packaging>pom</packaging>
-  <name>Assemble</name>
+  <name>Assemblies</name>
   <properties>
     <accumulo-top>..</accumulo-top>
   </properties>
@@ -116,6 +116,7 @@
                 </goals>
                 <phase>package</phase>
                 <configuration>
+                  <attach>true</attach>
                   <descriptors>
                     
<descriptor>src/main/assemblies/binary-release.xml</descriptor>
                   </descriptors>
@@ -220,6 +221,37 @@
                       </sources>
                     </mapping>
                     <mapping>
+                      
<directory>/opt/accumulo/accumulo-${project.version}/proxy/thrift</directory>
+                      <sources>
+                        <source>
+                          
<location>${accumulo-top}/proxy/src/main/thrift</location>
+                          <includes>
+                            <include>*.thrift</include>
+                          </includes>
+                        </source>
+                        <source>
+                          <location>${accumulo-top}/proxy/target</location>
+                          <includes>
+                            <include>gen-cpp/**</include>
+                            <include>gen-py/**</include>
+                            <include>gen-rb/**</include>
+                          </includes>
+                        </source>
+                      </sources>
+                    </mapping>
+                    <mapping>
+                      
<directory>/opt/accumulo/accumulo-${project.version}/examples/simple</directory>
+                      <recurseDirectories>true</recurseDirectories>
+                      <sources>
+                        <source>
+                          <location>${accumulo-top}/examples/simple</location>
+                          <includes>
+                            <include>src/main/**</include>
+                          </includes>
+                        </source>
+                      </sources>
+                    </mapping>
+                    <mapping>
                       
<directory>/opt/accumulo/accumulo-${project.version}/conf</directory>
                       <recurseDirectories>true</recurseDirectories>
                       <sources>
@@ -399,6 +431,24 @@
                       <excludes>**/.svn/**,src/**</excludes>
                     </data>
                     <data>
+                      <src>${accumulo-top}/proxy/src/main/thrift</src>
+                      <type>directory</type>
+                      <mapper>
+                        <type>perm</type>
+                        <prefix>/usr/lib/accumulo/proxy/thrift</prefix>
+                      </mapper>
+                      <includes>*.thrift</includes>
+                    </data>
+                    <data>
+                      <src>${accumulo-top}/proxy/target</src>
+                      <type>directory</type>
+                      <mapper>
+                        <type>perm</type>
+                        <prefix>/usr/lib/accumulo/proxy/thrift</prefix>
+                      </mapper>
+                      <includes>gen-cpp/**,gen-py/**,gen-rb/**</includes>
+                    </data>
+                    <data>
                       <src>${accumulo-top}/bin</src>
                       <type>directory</type>
                       <mapper>
@@ -409,6 +459,16 @@
                       <excludes>**/.svn/**</excludes>
                     </data>
                     <data>
+                      <src>${accumulo-top}/examples/simple</src>
+                      <type>directory</type>
+                      <mapper>
+                        <type>perm</type>
+                        <prefix>/usr/lib/accumulo/examples/simple</prefix>
+                      </mapper>
+                      <includes>src/main/**</includes>
+                      <excludes>**/.svn/**</excludes>
+                    </data>
+                    <data>
                       <src>${accumulo-top}/conf</src>
                       <type>directory</type>
                       <mapper>

Modified: accumulo/trunk/assemble/src/main/assemblies/binary-release.xml
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/assemble/src/main/assemblies/binary-release.xml?rev=1483431&r1=1483430&r2=1483431&view=diff
==============================================================================
--- accumulo/trunk/assemble/src/main/assemblies/binary-release.xml (original)
+++ accumulo/trunk/assemble/src/main/assemblies/binary-release.xml Thu May 16 
16:11:41 2013
@@ -17,11 +17,10 @@
 -->
 <assembly 
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
 http://maven.apache.org/xsd/assembly-1.1.2.xsd";>
-  <id>binary-release</id>
+  <id>bin</id>
   <formats>
     <format>tar.gz</format>
   </formats>
-  <baseDirectory>accumulo-${project.version}</baseDirectory>
   <fileSets>
     <fileSet>
       <directory>../bin</directory>
@@ -37,6 +36,15 @@
       </includes>
     </fileSet>
     <fileSet>
+      <directory>../examples/simple</directory>
+      <outputDirectory>/examples/simple</outputDirectory>
+      <directoryMode>0755</directoryMode>
+      <fileMode>0644</fileMode>
+      <includes>
+        <include>src/main/**</include>
+      </includes>
+    </fileSet>
+    <fileSet>
       <directory>../lib/native</directory>
       <directoryMode>0755</directoryMode>
       <includes>
@@ -128,13 +136,18 @@
       <outputDirectory>proxy/thrift</outputDirectory>
       <includes>
         <include>gen-cpp/**</include>
-        <include>gen-java/**</include>
         <include>gen-py/**</include>
         <include>gen-rb/**</include>
       </includes>
-      <excludes>
-        <exclude>*</exclude>
-      </excludes>
+    </fileSet>
+    <fileSet>
+      <directory>../proxy/src/main/thrift</directory>
+      <directoryMode>0755</directoryMode>
+      <fileMode>0644</fileMode>
+      <outputDirectory>proxy/thrift</outputDirectory>
+      <includes>
+        <include>*.thrift</include>
+      </includes>
     </fileSet>
   </fileSets>
   <files>

Propchange: accumulo/trunk/core/
------------------------------------------------------------------------------
  Merged 
/accumulo/branches/1.5/core:r1480478-1480504,1480508-1480863,1480865-1481125,1481127-1481853,1481855-1481955,1481957-1482428,1482897-1483022,1483024-1483423

Modified: accumulo/trunk/core/pom.xml
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/core/pom.xml?rev=1483431&r1=1483430&r2=1483431&view=diff
==============================================================================
--- accumulo/trunk/core/pom.xml (original)
+++ accumulo/trunk/core/pom.xml Thu May 16 16:11:41 2013
@@ -19,7 +19,7 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.accumulo</groupId>
-    <artifactId>accumulo</artifactId>
+    <artifactId>accumulo-project</artifactId>
     <version>1.6.0-SNAPSHOT</version>
   </parent>
   <artifactId>accumulo-core</artifactId>

Modified: 
accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloFileOutputFormat.java
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloFileOutputFormat.java?rev=1483431&r1=1483430&r2=1483431&view=diff
==============================================================================
--- 
accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloFileOutputFormat.java
 (original)
+++ 
accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloFileOutputFormat.java
 Thu May 16 16:11:41 2013
@@ -65,7 +65,7 @@ public class AccumuloFileOutputFormat ex
    * @since 1.5.0
    */
   protected static AccumuloConfiguration getAccumuloConfiguration(JobContext 
context) {
-    return FileOutputConfigurator.getAccumuloConfiguration(CLASS, 
context.getConfiguration());
+    return FileOutputConfigurator.getAccumuloConfiguration(CLASS, 
InputFormatBase.getConfiguration(context));
   }
   
   /**
@@ -141,7 +141,7 @@ public class AccumuloFileOutputFormat ex
   @Override
   public RecordWriter<Key,Value> getRecordWriter(TaskAttemptContext context) 
throws IOException {
     // get the path of the temporary output file
-    final Configuration conf = context.getConfiguration();
+    final Configuration conf = InputFormatBase.getConfiguration(context);
     final AccumuloConfiguration acuConf = getAccumuloConfiguration(context);
     
     final String extension = acuConf.get(Property.TABLE_FILE_TYPE);

Modified: 
accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java?rev=1483431&r1=1483430&r2=1483431&view=diff
==============================================================================
--- 
accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java
 (original)
+++ 
accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java
 Thu May 16 16:11:41 2013
@@ -104,7 +104,7 @@ public class AccumuloOutputFormat extend
    * @see #setConnectorInfo(Job, String, AuthenticationToken)
    */
   protected static Boolean isConnectorInfoSet(JobContext context) {
-    return OutputConfigurator.isConnectorInfoSet(CLASS, 
context.getConfiguration());
+    return OutputConfigurator.isConnectorInfoSet(CLASS, 
InputFormatBase.getConfiguration(context));
   }
   
   /**
@@ -117,7 +117,7 @@ public class AccumuloOutputFormat extend
    * @see #setConnectorInfo(Job, String, AuthenticationToken)
    */
   protected static String getPrincipal(JobContext context) {
-    return OutputConfigurator.getPrincipal(CLASS, context.getConfiguration());
+    return OutputConfigurator.getPrincipal(CLASS, 
InputFormatBase.getConfiguration(context));
   }
   
   /**
@@ -130,7 +130,7 @@ public class AccumuloOutputFormat extend
    * @see #setConnectorInfo(Job, String, AuthenticationToken)
    */
   protected static String getTokenClass(JobContext context) {
-    return OutputConfigurator.getTokenClass(CLASS, context.getConfiguration());
+    return OutputConfigurator.getTokenClass(CLASS, 
InputFormatBase.getConfiguration(context));
   }
   
   /**
@@ -144,7 +144,7 @@ public class AccumuloOutputFormat extend
    * @see #setConnectorInfo(Job, String, AuthenticationToken)
    */
   protected static byte[] getToken(JobContext context) {
-    return OutputConfigurator.getToken(CLASS, context.getConfiguration());
+    return OutputConfigurator.getToken(CLASS, 
InputFormatBase.getConfiguration(context));
   }
   
   /**
@@ -186,7 +186,7 @@ public class AccumuloOutputFormat extend
    * @see #setMockInstance(Job, String)
    */
   protected static Instance getInstance(JobContext context) {
-    return OutputConfigurator.getInstance(CLASS, context.getConfiguration());
+    return OutputConfigurator.getInstance(CLASS, 
InputFormatBase.getConfiguration(context));
   }
   
   /**
@@ -212,7 +212,7 @@ public class AccumuloOutputFormat extend
    * @see #setLogLevel(Job, Level)
    */
   protected static Level getLogLevel(JobContext context) {
-    return OutputConfigurator.getLogLevel(CLASS, context.getConfiguration());
+    return OutputConfigurator.getLogLevel(CLASS, 
InputFormatBase.getConfiguration(context));
   }
   
   /**
@@ -239,7 +239,7 @@ public class AccumuloOutputFormat extend
    * @see #setDefaultTableName(Job, String)
    */
   protected static String getDefaultTableName(JobContext context) {
-    return OutputConfigurator.getDefaultTableName(CLASS, 
context.getConfiguration());
+    return OutputConfigurator.getDefaultTableName(CLASS, 
InputFormatBase.getConfiguration(context));
   }
   
   /**
@@ -266,7 +266,7 @@ public class AccumuloOutputFormat extend
    * @see #setBatchWriterOptions(Job, BatchWriterConfig)
    */
   protected static BatchWriterConfig getBatchWriterOptions(JobContext context) 
{
-    return OutputConfigurator.getBatchWriterOptions(CLASS, 
context.getConfiguration());
+    return OutputConfigurator.getBatchWriterOptions(CLASS, 
InputFormatBase.getConfiguration(context));
   }
   
   /**
@@ -295,7 +295,7 @@ public class AccumuloOutputFormat extend
    * @see #setCreateTables(Job, boolean)
    */
   protected static Boolean canCreateTables(JobContext context) {
-    return OutputConfigurator.canCreateTables(CLASS, 
context.getConfiguration());
+    return OutputConfigurator.canCreateTables(CLASS, 
InputFormatBase.getConfiguration(context));
   }
   
   /**
@@ -324,7 +324,7 @@ public class AccumuloOutputFormat extend
    * @see #setSimulationMode(Job, boolean)
    */
   protected static Boolean getSimulationMode(JobContext context) {
-    return OutputConfigurator.getSimulationMode(CLASS, 
context.getConfiguration());
+    return OutputConfigurator.getSimulationMode(CLASS, 
InputFormatBase.getConfiguration(context));
   }
   
   /**

Modified: 
accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java?rev=1483431&r1=1483430&r2=1483431&view=diff
==============================================================================
--- 
accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java
 (original)
+++ 
accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java
 Thu May 16 16:11:41 2013
@@ -20,6 +20,7 @@ import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
+import java.lang.reflect.Method;
 import java.math.BigInteger;
 import java.net.InetAddress;
 import java.net.URLDecoder;
@@ -126,7 +127,7 @@ public abstract class InputFormatBase<K,
    * @see #setConnectorInfo(Job, String, AuthenticationToken)
    */
   protected static Boolean isConnectorInfoSet(JobContext context) {
-    return InputConfigurator.isConnectorInfoSet(CLASS, 
context.getConfiguration());
+    return InputConfigurator.isConnectorInfoSet(CLASS, 
getConfiguration(context));
   }
   
   /**
@@ -139,7 +140,7 @@ public abstract class InputFormatBase<K,
    * @see #setConnectorInfo(Job, String, AuthenticationToken)
    */
   protected static String getPrincipal(JobContext context) {
-    return InputConfigurator.getPrincipal(CLASS, context.getConfiguration());
+    return InputConfigurator.getPrincipal(CLASS, getConfiguration(context));
   }
   
   /**
@@ -152,7 +153,7 @@ public abstract class InputFormatBase<K,
    * @see #setConnectorInfo(Job, String, AuthenticationToken)
    */
   protected static String getTokenClass(JobContext context) {
-    return InputConfigurator.getTokenClass(CLASS, context.getConfiguration());
+    return InputConfigurator.getTokenClass(CLASS, getConfiguration(context));
   }
   
   /**
@@ -166,7 +167,7 @@ public abstract class InputFormatBase<K,
    * @see #setConnectorInfo(Job, String, AuthenticationToken)
    */
   protected static byte[] getToken(JobContext context) {
-    return InputConfigurator.getToken(CLASS, context.getConfiguration());
+    return InputConfigurator.getToken(CLASS, getConfiguration(context));
   }
   
   /**
@@ -208,7 +209,7 @@ public abstract class InputFormatBase<K,
    * @see #setMockInstance(Job, String)
    */
   protected static Instance getInstance(JobContext context) {
-    return InputConfigurator.getInstance(CLASS, context.getConfiguration());
+    return InputConfigurator.getInstance(CLASS, getConfiguration(context));
   }
   
   /**
@@ -234,7 +235,7 @@ public abstract class InputFormatBase<K,
    * @see #setLogLevel(Job, Level)
    */
   protected static Level getLogLevel(JobContext context) {
-    return InputConfigurator.getLogLevel(CLASS, context.getConfiguration());
+    return InputConfigurator.getLogLevel(CLASS, getConfiguration(context));
   }
   
   /**
@@ -260,7 +261,7 @@ public abstract class InputFormatBase<K,
    * @see #setInputTableName(Job, String)
    */
   protected static String getInputTableName(JobContext context) {
-    return InputConfigurator.getInputTableName(CLASS, 
context.getConfiguration());
+    return InputConfigurator.getInputTableName(CLASS, 
getConfiguration(context));
   }
   
   /**
@@ -286,7 +287,7 @@ public abstract class InputFormatBase<K,
    * @see #setScanAuthorizations(Job, Authorizations)
    */
   protected static Authorizations getScanAuthorizations(JobContext context) {
-    return InputConfigurator.getScanAuthorizations(CLASS, 
context.getConfiguration());
+    return InputConfigurator.getScanAuthorizations(CLASS, 
getConfiguration(context));
   }
   
   /**
@@ -314,7 +315,7 @@ public abstract class InputFormatBase<K,
    * @see #setRanges(Job, Collection)
    */
   protected static List<Range> getRanges(JobContext context) throws 
IOException {
-    return InputConfigurator.getRanges(CLASS, context.getConfiguration());
+    return InputConfigurator.getRanges(CLASS, getConfiguration(context));
   }
   
   /**
@@ -341,7 +342,7 @@ public abstract class InputFormatBase<K,
    * @see #fetchColumns(Job, Collection)
    */
   protected static Set<Pair<Text,Text>> getFetchedColumns(JobContext context) {
-    return InputConfigurator.getFetchedColumns(CLASS, 
context.getConfiguration());
+    return InputConfigurator.getFetchedColumns(CLASS, 
getConfiguration(context));
   }
   
   /**
@@ -367,7 +368,7 @@ public abstract class InputFormatBase<K,
    * @see #addIterator(Job, IteratorSetting)
    */
   protected static List<IteratorSetting> getIterators(JobContext context) {
-    return InputConfigurator.getIterators(CLASS, context.getConfiguration());
+    return InputConfigurator.getIterators(CLASS, getConfiguration(context));
   }
   
   /**
@@ -398,7 +399,7 @@ public abstract class InputFormatBase<K,
    * @see #setAutoAdjustRanges(Job, boolean)
    */
   protected static boolean getAutoAdjustRanges(JobContext context) {
-    return InputConfigurator.getAutoAdjustRanges(CLASS, 
context.getConfiguration());
+    return InputConfigurator.getAutoAdjustRanges(CLASS, 
getConfiguration(context));
   }
   
   /**
@@ -427,7 +428,7 @@ public abstract class InputFormatBase<K,
    * @see #setScanIsolation(Job, boolean)
    */
   protected static boolean isIsolated(JobContext context) {
-    return InputConfigurator.isIsolated(CLASS, context.getConfiguration());
+    return InputConfigurator.isIsolated(CLASS, getConfiguration(context));
   }
   
   /**
@@ -457,7 +458,7 @@ public abstract class InputFormatBase<K,
    * @see #setLocalIterators(Job, boolean)
    */
   protected static boolean usesLocalIterators(JobContext context) {
-    return InputConfigurator.usesLocalIterators(CLASS, 
context.getConfiguration());
+    return InputConfigurator.usesLocalIterators(CLASS, 
getConfiguration(context));
   }
   
   /**
@@ -505,7 +506,7 @@ public abstract class InputFormatBase<K,
    * @see #setOfflineTableScan(Job, boolean)
    */
   protected static boolean isOfflineScan(JobContext context) {
-    return InputConfigurator.isOfflineScan(CLASS, context.getConfiguration());
+    return InputConfigurator.isOfflineScan(CLASS, getConfiguration(context));
   }
   
   /**
@@ -519,7 +520,7 @@ public abstract class InputFormatBase<K,
    * @since 1.5.0
    */
   protected static TabletLocator getTabletLocator(JobContext context) throws 
TableNotFoundException {
-    return InputConfigurator.getTabletLocator(CLASS, 
context.getConfiguration());
+    return InputConfigurator.getTabletLocator(CLASS, 
getConfiguration(context));
   }
   
   // InputFormat doesn't have the equivalent of OutputFormat's 
checkOutputSpecs(JobContext job)
@@ -533,7 +534,7 @@ public abstract class InputFormatBase<K,
    * @since 1.5.0
    */
   protected static void validateOptions(JobContext context) throws IOException 
{
-    InputConfigurator.validateOptions(CLASS, context.getConfiguration());
+    InputConfigurator.validateOptions(CLASS, getConfiguration(context));
   }
   
   /**
@@ -1341,5 +1342,17 @@ public abstract class InputFormatBase<K,
     }
     
   }
+
+  // use reflection to pull the Configuration out of the JobContext for Hadoop 
1 and Hadoop 2 compatibility
+  public static Configuration getConfiguration(JobContext context) {
+    try {
+      Class c = 
InputFormatBase.class.getClassLoader().loadClass("org.apache.hadoop.mapreduce.JobContext");
+      Method m = c.getMethod("getConfiguration");
+      Object o = m.invoke(context, new Object[0]);
+      return (Configuration)o;
+    } catch (Exception e) {
+      throw new RuntimeException(e);
+    }
+  }
   
 }

Modified: 
accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/TTimeoutTransport.java
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/TTimeoutTransport.java?rev=1483431&r1=1483430&r2=1483431&view=diff
==============================================================================
--- 
accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/TTimeoutTransport.java
 (original)
+++ 
accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/TTimeoutTransport.java
 Thu May 16 16:11:41 2013
@@ -21,6 +21,7 @@ import java.io.BufferedOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.lang.reflect.Method;
 import java.net.Socket;
 import java.net.SocketAddress;
 import java.nio.channels.spi.SelectorProvider;
@@ -31,12 +32,21 @@ import org.apache.thrift.transport.TTran
 
 public class TTimeoutTransport {
   
+  private static InputStream getInputStream(Socket socket, long timeout) {
+    try {
+      Method m = NetUtils.class.getMethod("getInputStream", Socket.class, 
Long.TYPE);
+      return (InputStream)m.invoke(null, socket, timeout);
+    } catch (Exception e) {
+      throw new RuntimeException(e);
+    }
+  }
+  
   public static TTransport create(SocketAddress addr, long timeoutMillis) 
throws IOException {
     Socket socket = SelectorProvider.provider().openSocketChannel().socket();
     socket.setSoLinger(false, 0);
     socket.setTcpNoDelay(true);
     socket.connect(addr);
-    InputStream input = new 
BufferedInputStream(NetUtils.getInputStream(socket, timeoutMillis), 1024 * 10);
+    InputStream input = new BufferedInputStream(getInputStream(socket, 
timeoutMillis), 1024 * 10);
     OutputStream output = new 
BufferedOutputStream(NetUtils.getOutputStream(socket, timeoutMillis), 1024 * 
10);
     return new TIOStreamTransport(input, output);
   }

Modified: 
accumulo/trunk/docs/src/main/latex/accumulo_user_manual/chapters/administration.tex
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/docs/src/main/latex/accumulo_user_manual/chapters/administration.tex?rev=1483431&r1=1483430&r2=1483431&view=diff
==============================================================================
--- 
accumulo/trunk/docs/src/main/latex/accumulo_user_manual/chapters/administration.tex
 (original)
+++ 
accumulo/trunk/docs/src/main/latex/accumulo_user_manual/chapters/administration.tex
 Thu May 16 16:11:41 2013
@@ -45,7 +45,7 @@ by the environment variable \texttt{\$AC
 
 \small
 \begin{verbatim}
-$ tar xzf accumulo-assemble-1.5.0-bin.tar.gz    # unpack to subdirectory
+$ tar xzf accumulo-1.5.0-bin.tar.gz    # unpack to subdirectory
 $ mv accumulo-1.5.0 $ACCUMULO_HOME # move to desired location
 \end{verbatim}
 \normalsize

Propchange: accumulo/trunk/examples/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Thu May 16 16:11:41 2013
@@ -2,5 +2,4 @@ target
 .settings
 .classpath
 .project
-lib
 accumulo-examples.iml

Propchange: accumulo/trunk/examples/
------------------------------------------------------------------------------
  Merged 
/accumulo/branches/1.5/examples:r1480478-1480504,1480508-1480863,1480865-1481125,1481127-1481853,1481855-1481955,1481957-1482428,1482897-1483022,1483024-1483423

Modified: accumulo/trunk/examples/pom.xml
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/examples/pom.xml?rev=1483431&r1=1483430&r2=1483431&view=diff
==============================================================================
--- accumulo/trunk/examples/pom.xml (original)
+++ accumulo/trunk/examples/pom.xml Thu May 16 16:11:41 2013
@@ -19,7 +19,7 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.accumulo</groupId>
-    <artifactId>accumulo</artifactId>
+    <artifactId>accumulo-project</artifactId>
     <version>1.6.0-SNAPSHOT</version>
   </parent>
   <artifactId>accumulo-examples</artifactId>
@@ -28,4 +28,29 @@
   <modules>
     <module>simple</module>
   </modules>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>copy-dependencies</id>
+            <goals>
+              <goal>copy-dependencies</goal>
+            </goals>
+            <phase>prepare-package</phase>
+            <configuration>
+              <outputDirectory>../../lib</outputDirectory>
+              <!-- just grab the non-provided runtime dependencies -->
+              <stripVersion>true</stripVersion>
+              <includeScope>runtime</includeScope>
+              <excludeTransitive>true</excludeTransitive>
+              <excludeClassifiers>sources,test-sources</excludeClassifiers>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
 </project>

Modified: accumulo/trunk/fate/pom.xml
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/fate/pom.xml?rev=1483431&r1=1483430&r2=1483431&view=diff
==============================================================================
--- accumulo/trunk/fate/pom.xml (original)
+++ accumulo/trunk/fate/pom.xml Thu May 16 16:11:41 2013
@@ -19,7 +19,7 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.accumulo</groupId>
-    <artifactId>accumulo</artifactId>
+    <artifactId>accumulo-project</artifactId>
     <version>1.6.0-SNAPSHOT</version>
   </parent>
   <artifactId>accumulo-fate</artifactId>

Propchange: 
accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java
------------------------------------------------------------------------------
  Merged 
/accumulo/branches/1.5/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java:r1480478-1480504,1480508-1480863,1480865-1481125,1481127-1481853,1481855-1481955,1481957-1482428,1482897-1483022,1483024-1483423

Propchange: 
accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java
------------------------------------------------------------------------------
  Merged 
/accumulo/branches/1.5/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:r1480478-1480504,1480508-1480863,1480865-1481125,1481127-1481853,1481855-1481955,1481957-1482428,1482897-1483022,1483024-1483423

Modified: accumulo/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/pom.xml?rev=1483431&r1=1483430&r2=1483431&view=diff
==============================================================================
--- accumulo/trunk/pom.xml (original)
+++ accumulo/trunk/pom.xml Thu May 16 16:11:41 2013
@@ -23,10 +23,10 @@
     <version>13</version>
   </parent>
   <groupId>org.apache.accumulo</groupId>
-  <artifactId>accumulo</artifactId>
+  <artifactId>accumulo-project</artifactId>
   <version>1.6.0-SNAPSHOT</version>
   <packaging>pom</packaging>
-  <name>Apache Accumulo</name>
+  <name>Apache Accumulo Project</name>
   <description>Apache Accumulo is a sorted, distributed key/value store based 
on Google's BigTable design. It is built on top of Apache Hadoop, Zookeeper, 
and Thrift. It features a few novel improvements on the BigTable design in the 
form of cell-level access labels and a server-side programming mechanism that 
can modify key/value pairs at various points in the data management 
process.</description>
   <!-- this URL is where the site derived via the maven-site-plugin ends up, 
not the generic site -->
   <url>http://accumulo.apache.org/maven-site/</url>
@@ -337,6 +337,7 @@
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-assembly-plugin</artifactId>
           <configuration>
+            <attach>false</attach>
             <tarLongFileMode>gnu</tarLongFileMode>
           </configuration>
         </plugin>
@@ -746,6 +747,35 @@
   </reporting>
   <profiles>
     <profile>
+      <id>apache-release</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>build-helper-maven-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>attach-source-release-assembly</id>
+                <goals>
+                  <goal>attach-artifact</goal>
+                </goals>
+                <configuration>
+                  <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
+                  <artifacts>
+                    <artifact>
+                      
<file>${project.build.directory}/${project.artifactId}-${project.version}-source-release.tar.gz</file>
+                      <type>tar.gz</type>
+                      <classifier>src</classifier>
+                    </artifact>
+                  </artifacts>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
       <!-- 'mvn clean -P sortpom' sorts -->
       <id>sortpom</id>
       <build>

Propchange: accumulo/trunk/pom.xml
------------------------------------------------------------------------------
  Merged 
/accumulo/branches/1.5/pom.xml:r1481250-1481853,1481855-1481955,1481957-1482428,1482897-1483022,1483024-1483423

Propchange: accumulo/trunk/proxy/README
------------------------------------------------------------------------------
  Merged 
/accumulo/branches/1.5/proxy/README:r1480478-1480504,1480508-1480863,1480865-1481125,1481127-1481853,1481855-1481955,1481957-1482428,1482897-1483022,1483024-1483423

Modified: accumulo/trunk/proxy/pom.xml
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/proxy/pom.xml?rev=1483431&r1=1483430&r2=1483431&view=diff
==============================================================================
--- accumulo/trunk/proxy/pom.xml (original)
+++ accumulo/trunk/proxy/pom.xml Thu May 16 16:11:41 2013
@@ -19,7 +19,7 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.accumulo</groupId>
-    <artifactId>accumulo</artifactId>
+    <artifactId>accumulo-project</artifactId>
     <version>1.6.0-SNAPSHOT</version>
   </parent>
   <artifactId>accumulo-proxy</artifactId>

Propchange: accumulo/trunk/server/
------------------------------------------------------------------------------
  Merged 
/accumulo/branches/1.5/server:r1480478-1480504,1480508-1480863,1480865-1481125,1481127-1481853,1481855-1481955,1481957-1482428,1482897-1483022,1483024-1483423

Modified: accumulo/trunk/server/pom.xml
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/server/pom.xml?rev=1483431&r1=1483430&r2=1483431&view=diff
==============================================================================
--- accumulo/trunk/server/pom.xml (original)
+++ accumulo/trunk/server/pom.xml Thu May 16 16:11:41 2013
@@ -19,7 +19,7 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.accumulo</groupId>
-    <artifactId>accumulo</artifactId>
+    <artifactId>accumulo-project</artifactId>
     <version>1.6.0-SNAPSHOT</version>
   </parent>
   <artifactId>accumulo-server</artifactId>

Modified: 
accumulo/trunk/server/src/main/java/org/apache/accumulo/server/Accumulo.java
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/Accumulo.java?rev=1483431&r1=1483430&r2=1483431&view=diff
==============================================================================
--- 
accumulo/trunk/server/src/main/java/org/apache/accumulo/server/Accumulo.java 
(original)
+++ 
accumulo/trunk/server/src/main/java/org/apache/accumulo/server/Accumulo.java 
Thu May 16 16:11:41 2013
@@ -20,6 +20,7 @@ import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.lang.reflect.Method;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.util.Map.Entry;
@@ -199,10 +200,7 @@ public class Accumulo {
     long sleep = 1000;
     while (true) {
       try {
-        if (!(fs instanceof DistributedFileSystem))
-          break;
-        DistributedFileSystem dfs = (DistributedFileSystem) 
FileSystem.get(CachedConfiguration.getInstance());
-        if (!dfs.setSafeMode(FSConstants.SafeModeAction.SAFEMODE_GET))
+        if (!isInSafeMode(fs))
           break;
         log.warn("Waiting for the NameNode to leave safemode");
       } catch (IOException ex) {
@@ -214,4 +212,49 @@ public class Accumulo {
     }
     log.info("Connected to HDFS");
   }
+
+  private static boolean isInSafeMode(FileSystem fs) throws IOException {
+    if (!(fs instanceof DistributedFileSystem))
+      return false;
+    DistributedFileSystem dfs = (DistributedFileSystem) 
FileSystem.get(CachedConfiguration.getInstance());
+    // So this:  if (!dfs.setSafeMode(SafeModeAction.SAFEMODE_GET))
+    // Becomes this:
+    Class<?> constantClass;
+    try {
+      // hadoop 2.0
+      constantClass = 
Class.forName("org.apache.hadoop.hdfs.protocol.HdfsConstants");
+    } catch (ClassNotFoundException ex) {
+      // hadoop 1.0
+      try {
+        constantClass = 
Class.forName("org.apache.hadoop.hdfs.protocol.FSConstants");
+      } catch (ClassNotFoundException e) {
+        throw new RuntimeException("Cannot figure out the right class for 
Constants");
+      }
+    }
+    Class<?> safeModeAction = null;
+    for (Class<?> klass : constantClass.getDeclaredClasses()) {
+      if (klass.getSimpleName().equals("SafeModeAction")) {
+        safeModeAction = klass;
+        break;
+      }
+    }
+    if (safeModeAction == null) {
+      throw new RuntimeException("Cannot find SafeModeAction in constants 
class");
+    }
+    
+    Object get = null;
+    for (Object obj : safeModeAction.getEnumConstants()) {
+      if (obj.toString().equals("SAFEMODE_GET"))
+        get = obj;
+    }
+    if (get == null) {
+      throw new RuntimeException("cannot find SAFEMODE_GET");
+    }
+    try {
+      Method setSafeMode = dfs.getClass().getMethod("setSafeMode", 
safeModeAction);
+      return (Boolean)setSafeMode.invoke(dfs, get);
+    } catch (Exception ex) {
+      throw new RuntimeException("cannot find method setSafeMode");
+    }
+  }
 }

Propchange: accumulo/trunk/src/
------------------------------------------------------------------------------
  Merged 
/accumulo/branches/1.5/src:r1480478-1480504,1480508-1480863,1480865-1481125,1481127-1481853,1481855-1481955,1481957-1482428,1482897-1483022,1483024-1483423

Modified: accumulo/trunk/start/pom.xml
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/start/pom.xml?rev=1483431&r1=1483430&r2=1483431&view=diff
==============================================================================
--- accumulo/trunk/start/pom.xml (original)
+++ accumulo/trunk/start/pom.xml Thu May 16 16:11:41 2013
@@ -19,7 +19,7 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.accumulo</groupId>
-    <artifactId>accumulo</artifactId>
+    <artifactId>accumulo-project</artifactId>
     <version>1.6.0-SNAPSHOT</version>
   </parent>
   <artifactId>accumulo-start</artifactId>

Modified: accumulo/trunk/test/pom.xml
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/test/pom.xml?rev=1483431&r1=1483430&r2=1483431&view=diff
==============================================================================
--- accumulo/trunk/test/pom.xml (original)
+++ accumulo/trunk/test/pom.xml Thu May 16 16:11:41 2013
@@ -19,7 +19,7 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.accumulo</groupId>
-    <artifactId>accumulo</artifactId>
+    <artifactId>accumulo-project</artifactId>
     <version>1.6.0-SNAPSHOT</version>
   </parent>
   <artifactId>accumulo-test</artifactId>

Modified: accumulo/trunk/trace/pom.xml
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/trace/pom.xml?rev=1483431&r1=1483430&r2=1483431&view=diff
==============================================================================
--- accumulo/trunk/trace/pom.xml (original)
+++ accumulo/trunk/trace/pom.xml Thu May 16 16:11:41 2013
@@ -19,7 +19,7 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.accumulo</groupId>
-    <artifactId>accumulo</artifactId>
+    <artifactId>accumulo-project</artifactId>
     <version>1.6.0-SNAPSHOT</version>
   </parent>
   <artifactId>accumulo-trace</artifactId>


Reply via email to