You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ct...@apache.org on 2014/04/23 17:05:34 UTC

[01/15] git commit: ACCUMULO-2718 Make two test method names vary by more than case

Repository: accumulo
Updated Branches:
  refs/heads/1.4.6-SNAPSHOT 5b32fd22b -> 92c41719b
  refs/heads/1.5.2-SNAPSHOT c62d676e1 -> fd1ac9981
  refs/heads/1.6.0-SNAPSHOT 9c049a28e -> 9fa4e0f98
  refs/heads/findbugs [created] 1f2420c79
  refs/heads/master c1587d4da -> 7548cb712


ACCUMULO-2718 Make two test method names vary by more than case


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/1f2420c7
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/1f2420c7
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/1f2420c7

Branch: refs/heads/findbugs
Commit: 1f2420c79d318a080f1e7db9e5818cc71fc9a5b0
Parents: 936d2e0
Author: Christopher Tubbs <ct...@apache.org>
Authored: Tue Apr 22 14:52:58 2014 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Wed Apr 23 10:31:06 2014 -0400

----------------------------------------------------------------------
 pom.xml                                                         | 2 +-
 test/src/test/java/org/apache/accumulo/test/AuditMessageIT.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/1f2420c7/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index f709775..04b4de0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -460,7 +460,7 @@
             <effort>Max</effort>
             <failOnError>true</failOnError>
             <includeTests>true</includeTests>
-            <maxRank>3</maxRank>
+            <maxRank>4</maxRank>
           </configuration>
         </plugin>
         <plugin>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/1f2420c7/test/src/test/java/org/apache/accumulo/test/AuditMessageIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/AuditMessageIT.java b/test/src/test/java/org/apache/accumulo/test/AuditMessageIT.java
index dc44854..6e01ffb 100644
--- a/test/src/test/java/org/apache/accumulo/test/AuditMessageIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/AuditMessageIT.java
@@ -140,7 +140,7 @@ public class AuditMessageIT extends ConfigurableMacIT {
   }
 
   @Before
-  public void setup() throws AccumuloException, AccumuloSecurityException, TableNotFoundException, IOException {
+  public void resetInstance() throws AccumuloException, AccumuloSecurityException, TableNotFoundException, IOException {
     conn = getConnector();
 
     // I don't want to recreate the instance for every test since it will take ages.


[07/15] git commit: ACCUMULO-2654 Remove introduced warnings from previous commit

Posted by ct...@apache.org.
ACCUMULO-2654 Remove introduced warnings from previous commit


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/92c41719
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/92c41719
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/92c41719

Branch: refs/heads/1.5.2-SNAPSHOT
Commit: 92c41719bfc9cce7cb222c96155650bc11a288fb
Parents: 5b32fd2
Author: Christopher Tubbs <ct...@apache.org>
Authored: Wed Apr 23 10:43:48 2014 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Wed Apr 23 10:43:48 2014 -0400

----------------------------------------------------------------------
 .../java/org/apache/accumulo/core/file/rfile/CreateEmpty.java     | 3 ---
 1 file changed, 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/92c41719/src/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
----------------------------------------------------------------------
diff --git a/src/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java b/src/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
index 7663b2d..09f3648 100644
--- a/src/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
+++ b/src/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
@@ -16,12 +16,10 @@
  */
 package org.apache.accumulo.core.file.rfile;
 
-import java.util.ArrayList;
 import java.util.Arrays;
 
 import org.apache.accumulo.core.conf.DefaultConfiguration;
 import org.apache.accumulo.core.file.FileSKVWriter;
-import org.apache.accumulo.core.file.rfile.RFile.Writer;
 import org.apache.accumulo.core.file.rfile.bcfile.TFile;
 import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.commons.cli.BasicParser;
@@ -30,7 +28,6 @@ import org.apache.commons.cli.HelpFormatter;
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.Options;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 
 /**


[14/15] git commit: Merge branch '1.5.2-SNAPSHOT' into 1.6.0-SNAPSHOT

Posted by ct...@apache.org.
Merge branch '1.5.2-SNAPSHOT' into 1.6.0-SNAPSHOT


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/9fa4e0f9
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/9fa4e0f9
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/9fa4e0f9

Branch: refs/heads/master
Commit: 9fa4e0f980212b4c09cfac2b802566c60e67d664
Parents: 89d64c5 fd1ac99
Author: Christopher Tubbs <ct...@apache.org>
Authored: Wed Apr 23 11:03:00 2014 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Wed Apr 23 11:03:00 2014 -0400

----------------------------------------------------------------------
 .../accumulo/core/file/rfile/CreateEmpty.java   |  2 --
 .../functional/RecoveryWithEmptyRFileIT.java    | 24 ++------------------
 2 files changed, 2 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/9fa4e0f9/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
index 058bb84,f26aaef..9456331
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
@@@ -23,13 -23,10 +23,11 @@@ import java.util.List
  import org.apache.accumulo.core.cli.Help;
  import org.apache.accumulo.core.conf.DefaultConfiguration;
  import org.apache.accumulo.core.file.FileSKVWriter;
- import org.apache.accumulo.core.file.rfile.RFile.Writer;
 -import org.apache.accumulo.core.file.rfile.bcfile.TFile;
 +import org.apache.accumulo.core.file.rfile.bcfile.Compression;
  import org.apache.accumulo.core.util.CachedConfiguration;
  import org.apache.hadoop.conf.Configuration;
- import org.apache.hadoop.fs.FileSystem;
  import org.apache.hadoop.fs.Path;
 +import org.apache.log4j.Logger;
  
  import com.beust.jcommander.IParameterValidator;
  import com.beust.jcommander.Parameter;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/9fa4e0f9/test/src/test/java/org/apache/accumulo/test/functional/RecoveryWithEmptyRFileIT.java
----------------------------------------------------------------------
diff --cc test/src/test/java/org/apache/accumulo/test/functional/RecoveryWithEmptyRFileIT.java
index ea68482,0000000..814dd85
mode 100644,000000..100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/RecoveryWithEmptyRFileIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/RecoveryWithEmptyRFileIT.java
@@@ -1,134 -1,0 +1,114 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one or more
 + * contributor license agreements.  See the NOTICE file distributed with
 + * this work for additional information regarding copyright ownership.
 + * The ASF licenses this file to You under the Apache License, Version 2.0
 + * (the "License"); you may not use this file except in compliance with
 + * the License.  You may obtain a copy of the License at
 + *
 + *     http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an "AS IS" BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +package org.apache.accumulo.test.functional;
 +
 +import static org.junit.Assert.assertEquals;
- import static org.junit.Assert.assertFalse;
 +import static org.junit.Assert.assertTrue;
 +
- import java.net.URL;
- import java.util.Collections;
- import java.util.HashSet;
- import java.util.Map;
 +import java.util.Map.Entry;
- import java.util.Set;
- import java.util.TreeMap;
- import java.util.concurrent.atomic.AtomicBoolean;
 +
- import org.apache.accumulo.core.cli.BatchWriterOpts;
- import org.apache.accumulo.core.cli.ScannerOpts;
- import org.apache.accumulo.core.client.BatchScanner;
- import org.apache.accumulo.core.client.BatchWriter;
- import org.apache.accumulo.core.client.BatchWriterConfig;
 +import org.apache.accumulo.core.client.Connector;
 +import org.apache.accumulo.core.client.Scanner;
- import org.apache.accumulo.core.client.admin.TableOperations;
 +import org.apache.accumulo.core.data.Key;
- import org.apache.accumulo.core.data.Mutation;
 +import org.apache.accumulo.core.data.Range;
 +import org.apache.accumulo.core.data.Value;
 +import org.apache.accumulo.core.file.rfile.CreateEmpty;
 +import org.apache.accumulo.core.metadata.MetadataTable;
 +import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.DataFileColumnFamily;
 +import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 +import org.apache.accumulo.core.security.Authorizations;
- import org.apache.accumulo.monitor.Monitor;
- import org.apache.accumulo.server.util.Admin;
 +import org.apache.accumulo.test.functional.ReadWriteIT;
- import org.apache.accumulo.test.TestIngest;
- import org.apache.accumulo.test.TestMultiTableIngest;
- import org.apache.accumulo.test.VerifyIngest;
 +import org.apache.hadoop.conf.Configuration;
- import org.apache.hadoop.fs.FileStatus;
 +import org.apache.hadoop.fs.FileSystem;
 +import org.apache.hadoop.fs.Path;
 +import org.apache.hadoop.io.Text;
 +import org.apache.log4j.Logger;
 +import org.junit.Test;
 +
 +/**
 +  XXX As a part of verifying lossy recovery via inserting an empty rfile,
 +  this test deletes test table tablets. This will require write access to
 +  the backing files of the test Accumulo mini cluster.
 +
 +  This test should read the file location from the test harness and that
 +  file should be on the local filesystem. If you want to take a paranoid
 +  approach just make sure the test user doesn't have write access to the
 +  HDFS files of any colocated live Accumulo instance or any important
 +  local filesystem files..
 +*/
 +public class RecoveryWithEmptyRFileIT extends ConfigurableMacIT {
 +  private static final Logger log = Logger.getLogger(RecoveryWithEmptyRFileIT.class);
 +
 +  static final int ROWS = 200000;
 +  static final int COLS = 1;
 +  static final String COLF = "colf";
 +
 +  @Override
 +  protected int defaultTimeoutSeconds() {
 +    return 2 * 60;
 +  }
 +
 +  @Override
 +  public void configure(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite) {
 +    cfg.useMiniDFS(true);
 +  }
 +
 +  @Test
 +  public void replaceMissingRFile() throws Exception {
 +    log.info("Ingest some data, verify it was stored properly, replace an underlying rfile with an empty one and verify we can scan.");
 +    Connector connector = getConnector();
 +    ReadWriteIT.ingest(connector, ROWS, COLS, 50, 0);
 +    ReadWriteIT.verify(connector, ROWS, COLS, 50, 0);
 +
 +    connector.tableOperations().flush("test_ingest", null, null, true);
 +    connector.tableOperations().offline("test_ingest", true);
 +
 +    log.debug("Replacing rfile(s) with empty");
 +    Scanner meta = connector.createScanner(MetadataTable.NAME, Authorizations.EMPTY);
 +    String tableId = connector.tableOperations().tableIdMap().get("test_ingest");
 +    meta.setRange(new Range(new Text(tableId + ";"), new Text(tableId + "<")));
 +    meta.fetchColumnFamily(DataFileColumnFamily.NAME);
 +    boolean foundFile = false;
 +    for (Entry<Key,Value> entry : meta) {
 +      foundFile = true;
 +      Path rfile = new Path(entry.getKey().getColumnQualifier().toString());
 +      log.debug("Removing rfile '" + rfile + "'");
 +      cluster.getFileSystem().delete(rfile, false);
 +      Process info = cluster.exec(CreateEmpty.class, rfile.toString());
 +      assertEquals(0, info.waitFor());
 +    }
 +    meta.close();
 +    assertTrue(foundFile);
 +
 +    log.trace("invalidate cached file handles by issuing a compaction");
 +    connector.tableOperations().online("test_ingest", true);
 +    connector.tableOperations().compact("test_ingest", null, null, false, true);
 +
 +    log.debug("make sure we can still scan");
 +    Scanner scan = connector.createScanner("test_ingest", Authorizations.EMPTY);
 +    scan.setRange(new Range());
 +    long cells = 0l;
 +    for (Entry<Key,Value> entry : scan) {
-       cells++;
++      if (entry != null)
++        cells++;
 +    }
 +    scan.close();
 +    assertEquals(0l, cells);
 +    FileSystem.closeAll();
 +  }
 +
 +}


[10/15] git commit: Merge branch '1.4.6-SNAPSHOT' into 1.5.2-SNAPSHOT

Posted by ct...@apache.org.
Merge branch '1.4.6-SNAPSHOT' into 1.5.2-SNAPSHOT


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/fd1ac998
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/fd1ac998
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/fd1ac998

Branch: refs/heads/master
Commit: fd1ac9981bba9ec4e82e658e1ec60eee35d60bda
Parents: c62d676 92c4171
Author: Christopher Tubbs <ct...@apache.org>
Authored: Wed Apr 23 10:50:35 2014 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Wed Apr 23 10:50:35 2014 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java | 2 --
 1 file changed, 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/fd1ac998/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
index 09a2d61,0000000..f26aaef
mode 100644,000000..100644
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
@@@ -1,81 -1,0 +1,79 @@@
 +/**
 + * Licensed to the Apache Software Foundation (ASF) under one or more
 + * contributor license agreements.  See the NOTICE file distributed with
 + * this work for additional information regarding copyright ownership.
 + * The ASF licenses this file to You under the Apache License, Version 2.0
 + * (the "License"); you may not use this file except in compliance with
 + * the License.  You may obtain a copy of the License at
 + *
 + *     http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an "AS IS" BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +package org.apache.accumulo.core.file.rfile;
 +
 +import java.util.ArrayList;
 +import java.util.Arrays;
 +import java.util.List;
 +
 +import org.apache.accumulo.core.cli.Help;
 +import org.apache.accumulo.core.conf.DefaultConfiguration;
 +import org.apache.accumulo.core.file.FileSKVWriter;
- import org.apache.accumulo.core.file.rfile.RFile.Writer;
 +import org.apache.accumulo.core.file.rfile.bcfile.TFile;
 +import org.apache.accumulo.core.util.CachedConfiguration;
 +import org.apache.hadoop.conf.Configuration;
- import org.apache.hadoop.fs.FileSystem;
 +import org.apache.hadoop.fs.Path;
 +
 +import com.beust.jcommander.IParameterValidator;
 +import com.beust.jcommander.Parameter;
 +import com.beust.jcommander.ParameterException;
 +
 +/**
 + * Create an empty RFile for use in recovering from data loss where Accumulo still refers internally to a path.
 + */
 +public class CreateEmpty {
 +
 +  public static class NamedLikeRFile implements IParameterValidator {
 +    @Override
 +    public void validate(String name, String value) throws ParameterException {
 +      if (!value.endsWith(".rf")) {
 +        throw new ParameterException("File must end with .rf and '" + value + "' does not.");
 +      }
 +    }
 +  }
 +
 +  public static class IsSupportedCompressionAlgorithm implements IParameterValidator {
 +    @Override
 +    public void validate(String name, String value) throws ParameterException {
 +      String[] algorithms = TFile.getSupportedCompressionAlgorithms();
 +      if (!((Arrays.asList(algorithms)).contains(value))) {
 +        throw new ParameterException("Compression codec must be one of " + Arrays.toString(TFile.getSupportedCompressionAlgorithms()));
 +      }
 +    }
 +  }
 +
 +  static class Opts extends Help {
 +    @Parameter(names = {"-c", "--codec"}, description = "the compression codec to use.", validateWith = IsSupportedCompressionAlgorithm.class)
 +    String codec = TFile.COMPRESSION_NONE;
 +    @Parameter(description = " <path> { <path> ... } Each path given is a URL. Relative paths are resolved according to the default filesystem defined in your Hadoop configuration, which is usually an HDFS instance.", required = true, validateWith = NamedLikeRFile.class)
 +    List<String> files = new ArrayList<String>();
 +  }
 +
 +  public static void main(String[] args) throws Exception {
 +    Configuration conf = CachedConfiguration.getInstance();
 +
 +    Opts opts = new Opts();
 +    opts.parseArgs(CreateEmpty.class.getName(), args);
 +
 +    for (String arg : opts.files) {
 +      Path path = new Path(arg);
 +      FileSKVWriter writer = (new RFileOperations()).openWriter(arg, path.getFileSystem(conf), conf, DefaultConfiguration.getDefaultConfiguration(), opts.codec);
 +      writer.close();
 +    }
 +  }
 +
 +}


[05/15] git commit: ACCUMULO-2654 Remove introduced warnings from previous commit

Posted by ct...@apache.org.
ACCUMULO-2654 Remove introduced warnings from previous commit


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/92c41719
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/92c41719
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/92c41719

Branch: refs/heads/1.4.6-SNAPSHOT
Commit: 92c41719bfc9cce7cb222c96155650bc11a288fb
Parents: 5b32fd2
Author: Christopher Tubbs <ct...@apache.org>
Authored: Wed Apr 23 10:43:48 2014 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Wed Apr 23 10:43:48 2014 -0400

----------------------------------------------------------------------
 .../java/org/apache/accumulo/core/file/rfile/CreateEmpty.java     | 3 ---
 1 file changed, 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/92c41719/src/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
----------------------------------------------------------------------
diff --git a/src/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java b/src/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
index 7663b2d..09f3648 100644
--- a/src/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
+++ b/src/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
@@ -16,12 +16,10 @@
  */
 package org.apache.accumulo.core.file.rfile;
 
-import java.util.ArrayList;
 import java.util.Arrays;
 
 import org.apache.accumulo.core.conf.DefaultConfiguration;
 import org.apache.accumulo.core.file.FileSKVWriter;
-import org.apache.accumulo.core.file.rfile.RFile.Writer;
 import org.apache.accumulo.core.file.rfile.bcfile.TFile;
 import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.commons.cli.BasicParser;
@@ -30,7 +28,6 @@ import org.apache.commons.cli.HelpFormatter;
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.Options;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 
 /**


[13/15] git commit: Merge branch '1.5.2-SNAPSHOT' into 1.6.0-SNAPSHOT

Posted by ct...@apache.org.
Merge branch '1.5.2-SNAPSHOT' into 1.6.0-SNAPSHOT


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/9fa4e0f9
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/9fa4e0f9
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/9fa4e0f9

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 9fa4e0f980212b4c09cfac2b802566c60e67d664
Parents: 89d64c5 fd1ac99
Author: Christopher Tubbs <ct...@apache.org>
Authored: Wed Apr 23 11:03:00 2014 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Wed Apr 23 11:03:00 2014 -0400

----------------------------------------------------------------------
 .../accumulo/core/file/rfile/CreateEmpty.java   |  2 --
 .../functional/RecoveryWithEmptyRFileIT.java    | 24 ++------------------
 2 files changed, 2 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/9fa4e0f9/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
index 058bb84,f26aaef..9456331
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
@@@ -23,13 -23,10 +23,11 @@@ import java.util.List
  import org.apache.accumulo.core.cli.Help;
  import org.apache.accumulo.core.conf.DefaultConfiguration;
  import org.apache.accumulo.core.file.FileSKVWriter;
- import org.apache.accumulo.core.file.rfile.RFile.Writer;
 -import org.apache.accumulo.core.file.rfile.bcfile.TFile;
 +import org.apache.accumulo.core.file.rfile.bcfile.Compression;
  import org.apache.accumulo.core.util.CachedConfiguration;
  import org.apache.hadoop.conf.Configuration;
- import org.apache.hadoop.fs.FileSystem;
  import org.apache.hadoop.fs.Path;
 +import org.apache.log4j.Logger;
  
  import com.beust.jcommander.IParameterValidator;
  import com.beust.jcommander.Parameter;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/9fa4e0f9/test/src/test/java/org/apache/accumulo/test/functional/RecoveryWithEmptyRFileIT.java
----------------------------------------------------------------------
diff --cc test/src/test/java/org/apache/accumulo/test/functional/RecoveryWithEmptyRFileIT.java
index ea68482,0000000..814dd85
mode 100644,000000..100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/RecoveryWithEmptyRFileIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/RecoveryWithEmptyRFileIT.java
@@@ -1,134 -1,0 +1,114 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one or more
 + * contributor license agreements.  See the NOTICE file distributed with
 + * this work for additional information regarding copyright ownership.
 + * The ASF licenses this file to You under the Apache License, Version 2.0
 + * (the "License"); you may not use this file except in compliance with
 + * the License.  You may obtain a copy of the License at
 + *
 + *     http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an "AS IS" BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +package org.apache.accumulo.test.functional;
 +
 +import static org.junit.Assert.assertEquals;
- import static org.junit.Assert.assertFalse;
 +import static org.junit.Assert.assertTrue;
 +
- import java.net.URL;
- import java.util.Collections;
- import java.util.HashSet;
- import java.util.Map;
 +import java.util.Map.Entry;
- import java.util.Set;
- import java.util.TreeMap;
- import java.util.concurrent.atomic.AtomicBoolean;
 +
- import org.apache.accumulo.core.cli.BatchWriterOpts;
- import org.apache.accumulo.core.cli.ScannerOpts;
- import org.apache.accumulo.core.client.BatchScanner;
- import org.apache.accumulo.core.client.BatchWriter;
- import org.apache.accumulo.core.client.BatchWriterConfig;
 +import org.apache.accumulo.core.client.Connector;
 +import org.apache.accumulo.core.client.Scanner;
- import org.apache.accumulo.core.client.admin.TableOperations;
 +import org.apache.accumulo.core.data.Key;
- import org.apache.accumulo.core.data.Mutation;
 +import org.apache.accumulo.core.data.Range;
 +import org.apache.accumulo.core.data.Value;
 +import org.apache.accumulo.core.file.rfile.CreateEmpty;
 +import org.apache.accumulo.core.metadata.MetadataTable;
 +import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.DataFileColumnFamily;
 +import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 +import org.apache.accumulo.core.security.Authorizations;
- import org.apache.accumulo.monitor.Monitor;
- import org.apache.accumulo.server.util.Admin;
 +import org.apache.accumulo.test.functional.ReadWriteIT;
- import org.apache.accumulo.test.TestIngest;
- import org.apache.accumulo.test.TestMultiTableIngest;
- import org.apache.accumulo.test.VerifyIngest;
 +import org.apache.hadoop.conf.Configuration;
- import org.apache.hadoop.fs.FileStatus;
 +import org.apache.hadoop.fs.FileSystem;
 +import org.apache.hadoop.fs.Path;
 +import org.apache.hadoop.io.Text;
 +import org.apache.log4j.Logger;
 +import org.junit.Test;
 +
 +/**
 +  XXX As a part of verifying lossy recovery via inserting an empty rfile,
 +  this test deletes test table tablets. This will require write access to
 +  the backing files of the test Accumulo mini cluster.
 +
 +  This test should read the file location from the test harness and that
 +  file should be on the local filesystem. If you want to take a paranoid
 +  approach just make sure the test user doesn't have write access to the
 +  HDFS files of any colocated live Accumulo instance or any important
 +  local filesystem files..
 +*/
 +public class RecoveryWithEmptyRFileIT extends ConfigurableMacIT {
 +  private static final Logger log = Logger.getLogger(RecoveryWithEmptyRFileIT.class);
 +
 +  static final int ROWS = 200000;
 +  static final int COLS = 1;
 +  static final String COLF = "colf";
 +
 +  @Override
 +  protected int defaultTimeoutSeconds() {
 +    return 2 * 60;
 +  }
 +
 +  @Override
 +  public void configure(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite) {
 +    cfg.useMiniDFS(true);
 +  }
 +
 +  @Test
 +  public void replaceMissingRFile() throws Exception {
 +    log.info("Ingest some data, verify it was stored properly, replace an underlying rfile with an empty one and verify we can scan.");
 +    Connector connector = getConnector();
 +    ReadWriteIT.ingest(connector, ROWS, COLS, 50, 0);
 +    ReadWriteIT.verify(connector, ROWS, COLS, 50, 0);
 +
 +    connector.tableOperations().flush("test_ingest", null, null, true);
 +    connector.tableOperations().offline("test_ingest", true);
 +
 +    log.debug("Replacing rfile(s) with empty");
 +    Scanner meta = connector.createScanner(MetadataTable.NAME, Authorizations.EMPTY);
 +    String tableId = connector.tableOperations().tableIdMap().get("test_ingest");
 +    meta.setRange(new Range(new Text(tableId + ";"), new Text(tableId + "<")));
 +    meta.fetchColumnFamily(DataFileColumnFamily.NAME);
 +    boolean foundFile = false;
 +    for (Entry<Key,Value> entry : meta) {
 +      foundFile = true;
 +      Path rfile = new Path(entry.getKey().getColumnQualifier().toString());
 +      log.debug("Removing rfile '" + rfile + "'");
 +      cluster.getFileSystem().delete(rfile, false);
 +      Process info = cluster.exec(CreateEmpty.class, rfile.toString());
 +      assertEquals(0, info.waitFor());
 +    }
 +    meta.close();
 +    assertTrue(foundFile);
 +
 +    log.trace("invalidate cached file handles by issuing a compaction");
 +    connector.tableOperations().online("test_ingest", true);
 +    connector.tableOperations().compact("test_ingest", null, null, false, true);
 +
 +    log.debug("make sure we can still scan");
 +    Scanner scan = connector.createScanner("test_ingest", Authorizations.EMPTY);
 +    scan.setRange(new Range());
 +    long cells = 0l;
 +    for (Entry<Key,Value> entry : scan) {
-       cells++;
++      if (entry != null)
++        cells++;
 +    }
 +    scan.close();
 +    assertEquals(0l, cells);
 +    FileSystem.closeAll();
 +  }
 +
 +}


[06/15] git commit: ACCUMULO-2654 Remove introduced warnings from previous commit

Posted by ct...@apache.org.
ACCUMULO-2654 Remove introduced warnings from previous commit


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/92c41719
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/92c41719
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/92c41719

Branch: refs/heads/master
Commit: 92c41719bfc9cce7cb222c96155650bc11a288fb
Parents: 5b32fd2
Author: Christopher Tubbs <ct...@apache.org>
Authored: Wed Apr 23 10:43:48 2014 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Wed Apr 23 10:43:48 2014 -0400

----------------------------------------------------------------------
 .../java/org/apache/accumulo/core/file/rfile/CreateEmpty.java     | 3 ---
 1 file changed, 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/92c41719/src/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
----------------------------------------------------------------------
diff --git a/src/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java b/src/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
index 7663b2d..09f3648 100644
--- a/src/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
+++ b/src/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
@@ -16,12 +16,10 @@
  */
 package org.apache.accumulo.core.file.rfile;
 
-import java.util.ArrayList;
 import java.util.Arrays;
 
 import org.apache.accumulo.core.conf.DefaultConfiguration;
 import org.apache.accumulo.core.file.FileSKVWriter;
-import org.apache.accumulo.core.file.rfile.RFile.Writer;
 import org.apache.accumulo.core.file.rfile.bcfile.TFile;
 import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.commons.cli.BasicParser;
@@ -30,7 +28,6 @@ import org.apache.commons.cli.HelpFormatter;
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.Options;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 
 /**


[04/15] git commit: ACCUMULO-2654 Remove introduced warnings from previous commit

Posted by ct...@apache.org.
ACCUMULO-2654 Remove introduced warnings from previous commit


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/92c41719
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/92c41719
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/92c41719

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 92c41719bfc9cce7cb222c96155650bc11a288fb
Parents: 5b32fd2
Author: Christopher Tubbs <ct...@apache.org>
Authored: Wed Apr 23 10:43:48 2014 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Wed Apr 23 10:43:48 2014 -0400

----------------------------------------------------------------------
 .../java/org/apache/accumulo/core/file/rfile/CreateEmpty.java     | 3 ---
 1 file changed, 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/92c41719/src/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
----------------------------------------------------------------------
diff --git a/src/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java b/src/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
index 7663b2d..09f3648 100644
--- a/src/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
+++ b/src/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
@@ -16,12 +16,10 @@
  */
 package org.apache.accumulo.core.file.rfile;
 
-import java.util.ArrayList;
 import java.util.Arrays;
 
 import org.apache.accumulo.core.conf.DefaultConfiguration;
 import org.apache.accumulo.core.file.FileSKVWriter;
-import org.apache.accumulo.core.file.rfile.RFile.Writer;
 import org.apache.accumulo.core.file.rfile.bcfile.TFile;
 import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.commons.cli.BasicParser;
@@ -30,7 +28,6 @@ import org.apache.commons.cli.HelpFormatter;
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.Options;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 
 /**


[03/15] git commit: ACCUMULO-2707 Remove vestigial build-helper execution

Posted by ct...@apache.org.
ACCUMULO-2707 Remove vestigial build-helper execution

  Remove unneeded execution of the build-helper-maven-plugin leftover after
  ACCUMULO-2606


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/fc28c2a2
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/fc28c2a2
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/fc28c2a2

Branch: refs/heads/findbugs
Commit: fc28c2a2f6b868eed53218558089f3a2337d313c
Parents: 9c049a2
Author: Christopher Tubbs <ct...@apache.org>
Authored: Tue Apr 22 10:05:04 2014 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Wed Apr 23 10:31:06 2014 -0400

----------------------------------------------------------------------
 pom.xml | 32 --------------------------------
 1 file changed, 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/fc28c2a2/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 133e08e..2edb662 100644
--- a/pom.xml
+++ b/pom.xml
@@ -622,19 +622,6 @@
               <pluginExecutions>
                 <pluginExecution>
                   <pluginExecutionFilter>
-                    <groupId>org.codehaus.mojo</groupId>
-                    <artifactId>build-helper-maven-plugin</artifactId>
-                    <versionRange>[1.8,)</versionRange>
-                    <goals>
-                      <goal>regex-property</goal>
-                    </goals>
-                  </pluginExecutionFilter>
-                  <action>
-                    <ignore />
-                  </action>
-                </pluginExecution>
-                <pluginExecution>
-                  <pluginExecutionFilter>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-dependency-plugin</artifactId>
                     <versionRange>[2.0,)</versionRange>
@@ -863,25 +850,6 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>regex-property</id>
-            <goals>
-              <goal>regex-property</goal>
-            </goals>
-            <configuration>
-              <name>project.version.base</name>
-              <value>${project.version}</value>
-              <regex>-SNAPSHOT</regex>
-              <replacement />
-              <failIfNoMatch>false</failIfNoMatch>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
     </plugins>
     <extensions>
       <extension>


[02/15] git commit: ACCUMULO-2715 Fix findbugs integer comparison warning in examples

Posted by ct...@apache.org.
ACCUMULO-2715 Fix findbugs integer comparison warning in examples


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/936d2e05
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/936d2e05
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/936d2e05

Branch: refs/heads/findbugs
Commit: 936d2e05cbb693f610f758011c087c3db5241d79
Parents: fc28c2a
Author: Christopher Tubbs <ct...@apache.org>
Authored: Tue Apr 22 12:40:12 2014 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Wed Apr 23 10:31:06 2014 -0400

----------------------------------------------------------------------
 .../examples/simple/client/RandomBatchWriter.java         | 10 ++++------
 pom.xml                                                   |  2 +-
 2 files changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/936d2e05/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchWriter.java
----------------------------------------------------------------------
diff --git a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchWriter.java b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchWriter.java
index 44947d1..ef3d691 100644
--- a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchWriter.java
+++ b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchWriter.java
@@ -124,12 +124,10 @@ public class RandomBatchWriter {
     Opts opts = new Opts();
     BatchWriterOpts bwOpts = new BatchWriterOpts();
     opts.parseArgs(RandomBatchWriter.class.getName(), args, bwOpts);
-    if ((opts.max - opts.min) < (long)opts.num) {
-      System.err
-          .println(String
-              .format(
-                  "You must specify a min and a max that allow for at least num possible values. For example, you requested %d rows, but a min of %d and a max of %d (exclusive), which only allows for %d rows.",
-                  opts.num, opts.min, opts.max, (opts.max - opts.min)));
+    if ((opts.max - opts.min) < 1L * opts.num) { // right-side multiplied by 1L to convert to long in a way that doesn't trigger FindBugs
+      System.err.println(String.format("You must specify a min and a max that allow for at least num possible values. "
+          + "For example, you requested %d rows, but a min of %d and a max of %d (exclusive), which only allows for %d rows.", opts.num, opts.min, opts.max,
+          (opts.max - opts.min)));
       System.exit(1);
     }
     Random r;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/936d2e05/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 2edb662..f709775 100644
--- a/pom.xml
+++ b/pom.xml
@@ -460,7 +460,7 @@
             <effort>Max</effort>
             <failOnError>true</failOnError>
             <includeTests>true</includeTests>
-            <maxRank>1</maxRank>
+            <maxRank>3</maxRank>
           </configuration>
         </plugin>
         <plugin>


[15/15] git commit: Merge branch '1.6.0-SNAPSHOT'

Posted by ct...@apache.org.
Merge branch '1.6.0-SNAPSHOT'


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/7548cb71
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/7548cb71
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/7548cb71

Branch: refs/heads/master
Commit: 7548cb71238799529cc09e1f55b96abeed0e4311
Parents: c1587d4 9fa4e0f
Author: Christopher Tubbs <ct...@apache.org>
Authored: Wed Apr 23 11:05:10 2014 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Wed Apr 23 11:05:10 2014 -0400

----------------------------------------------------------------------
 .../accumulo/core/file/rfile/CreateEmpty.java   |  2 -
 .../monitor/servlets/trace/SummaryTest.java     | 42 ++++++++++++++++++++
 .../monitor/servlets/trace/SummaryTest.java     | 42 --------------------
 .../functional/RecoveryWithEmptyRFileIT.java    | 24 +----------
 4 files changed, 44 insertions(+), 66 deletions(-)
----------------------------------------------------------------------



[12/15] git commit: ACCUMULO-2723 Put test in correct location

Posted by ct...@apache.org.
ACCUMULO-2723 Put test in correct location

  Introduced by ACCUMULO-2631 bad merge


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/89d64c5b
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/89d64c5b
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/89d64c5b

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 89d64c5bd0588e9dadfc076783d55aa000a12194
Parents: 9c049a2
Author: Christopher Tubbs <ct...@apache.org>
Authored: Wed Apr 23 10:54:27 2014 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Wed Apr 23 10:56:54 2014 -0400

----------------------------------------------------------------------
 .../monitor/servlets/trace/SummaryTest.java     | 42 ++++++++++++++++++++
 .../monitor/servlets/trace/SummaryTest.java     | 42 --------------------
 2 files changed, 42 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/89d64c5b/server/monitor/src/test/java/org/apache/accumulo/monitor/servlets/trace/SummaryTest.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/test/java/org/apache/accumulo/monitor/servlets/trace/SummaryTest.java b/server/monitor/src/test/java/org/apache/accumulo/monitor/servlets/trace/SummaryTest.java
new file mode 100644
index 0000000..23cdc0b
--- /dev/null
+++ b/server/monitor/src/test/java/org/apache/accumulo/monitor/servlets/trace/SummaryTest.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.accumulo.monitor.servlets.trace;
+
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * 
+ */
+public class SummaryTest {
+
+  private Summary summary;
+
+  @Before
+  public void setup() {
+    summary = new Summary();
+  }
+
+  @Test
+  public void testRangeValues() {
+    summary.getRangeForTrace(10);
+    summary.getRangeForTrace(100);
+    summary.getRangeForTrace(4990000);
+    summary.getRangeForTrace(Long.MAX_VALUE);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/89d64c5b/server/src/test/java/org/apache/accumulo/server/monitor/servlets/trace/SummaryTest.java
----------------------------------------------------------------------
diff --git a/server/src/test/java/org/apache/accumulo/server/monitor/servlets/trace/SummaryTest.java b/server/src/test/java/org/apache/accumulo/server/monitor/servlets/trace/SummaryTest.java
deleted file mode 100644
index f983066..0000000
--- a/server/src/test/java/org/apache/accumulo/server/monitor/servlets/trace/SummaryTest.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.accumulo.server.monitor.servlets.trace;
-
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * 
- */
-public class SummaryTest {
-
-  private Summary summary;
-
-  @Before
-  public void setup() {
-    summary = new Summary();
-  }
-
-  @Test
-  public void testRangeValues() {
-    summary.getRangeForTrace(10);
-    summary.getRangeForTrace(100);
-    summary.getRangeForTrace(4990000);
-    summary.getRangeForTrace(Long.MAX_VALUE);
-  }
-
-}


[08/15] git commit: Merge branch '1.4.6-SNAPSHOT' into 1.5.2-SNAPSHOT

Posted by ct...@apache.org.
Merge branch '1.4.6-SNAPSHOT' into 1.5.2-SNAPSHOT


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/fd1ac998
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/fd1ac998
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/fd1ac998

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: fd1ac9981bba9ec4e82e658e1ec60eee35d60bda
Parents: c62d676 92c4171
Author: Christopher Tubbs <ct...@apache.org>
Authored: Wed Apr 23 10:50:35 2014 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Wed Apr 23 10:50:35 2014 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java | 2 --
 1 file changed, 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/fd1ac998/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
index 09a2d61,0000000..f26aaef
mode 100644,000000..100644
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
@@@ -1,81 -1,0 +1,79 @@@
 +/**
 + * Licensed to the Apache Software Foundation (ASF) under one or more
 + * contributor license agreements.  See the NOTICE file distributed with
 + * this work for additional information regarding copyright ownership.
 + * The ASF licenses this file to You under the Apache License, Version 2.0
 + * (the "License"); you may not use this file except in compliance with
 + * the License.  You may obtain a copy of the License at
 + *
 + *     http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an "AS IS" BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +package org.apache.accumulo.core.file.rfile;
 +
 +import java.util.ArrayList;
 +import java.util.Arrays;
 +import java.util.List;
 +
 +import org.apache.accumulo.core.cli.Help;
 +import org.apache.accumulo.core.conf.DefaultConfiguration;
 +import org.apache.accumulo.core.file.FileSKVWriter;
- import org.apache.accumulo.core.file.rfile.RFile.Writer;
 +import org.apache.accumulo.core.file.rfile.bcfile.TFile;
 +import org.apache.accumulo.core.util.CachedConfiguration;
 +import org.apache.hadoop.conf.Configuration;
- import org.apache.hadoop.fs.FileSystem;
 +import org.apache.hadoop.fs.Path;
 +
 +import com.beust.jcommander.IParameterValidator;
 +import com.beust.jcommander.Parameter;
 +import com.beust.jcommander.ParameterException;
 +
 +/**
 + * Create an empty RFile for use in recovering from data loss where Accumulo still refers internally to a path.
 + */
 +public class CreateEmpty {
 +
 +  public static class NamedLikeRFile implements IParameterValidator {
 +    @Override
 +    public void validate(String name, String value) throws ParameterException {
 +      if (!value.endsWith(".rf")) {
 +        throw new ParameterException("File must end with .rf and '" + value + "' does not.");
 +      }
 +    }
 +  }
 +
 +  public static class IsSupportedCompressionAlgorithm implements IParameterValidator {
 +    @Override
 +    public void validate(String name, String value) throws ParameterException {
 +      String[] algorithms = TFile.getSupportedCompressionAlgorithms();
 +      if (!((Arrays.asList(algorithms)).contains(value))) {
 +        throw new ParameterException("Compression codec must be one of " + Arrays.toString(TFile.getSupportedCompressionAlgorithms()));
 +      }
 +    }
 +  }
 +
 +  static class Opts extends Help {
 +    @Parameter(names = {"-c", "--codec"}, description = "the compression codec to use.", validateWith = IsSupportedCompressionAlgorithm.class)
 +    String codec = TFile.COMPRESSION_NONE;
 +    @Parameter(description = " <path> { <path> ... } Each path given is a URL. Relative paths are resolved according to the default filesystem defined in your Hadoop configuration, which is usually an HDFS instance.", required = true, validateWith = NamedLikeRFile.class)
 +    List<String> files = new ArrayList<String>();
 +  }
 +
 +  public static void main(String[] args) throws Exception {
 +    Configuration conf = CachedConfiguration.getInstance();
 +
 +    Opts opts = new Opts();
 +    opts.parseArgs(CreateEmpty.class.getName(), args);
 +
 +    for (String arg : opts.files) {
 +      Path path = new Path(arg);
 +      FileSKVWriter writer = (new RFileOperations()).openWriter(arg, path.getFileSystem(conf), conf, DefaultConfiguration.getDefaultConfiguration(), opts.codec);
 +      writer.close();
 +    }
 +  }
 +
 +}


[11/15] git commit: ACCUMULO-2723 Put test in correct location

Posted by ct...@apache.org.
ACCUMULO-2723 Put test in correct location

  Introduced by ACCUMULO-2631 bad merge


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/89d64c5b
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/89d64c5b
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/89d64c5b

Branch: refs/heads/master
Commit: 89d64c5bd0588e9dadfc076783d55aa000a12194
Parents: 9c049a2
Author: Christopher Tubbs <ct...@apache.org>
Authored: Wed Apr 23 10:54:27 2014 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Wed Apr 23 10:56:54 2014 -0400

----------------------------------------------------------------------
 .../monitor/servlets/trace/SummaryTest.java     | 42 ++++++++++++++++++++
 .../monitor/servlets/trace/SummaryTest.java     | 42 --------------------
 2 files changed, 42 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/89d64c5b/server/monitor/src/test/java/org/apache/accumulo/monitor/servlets/trace/SummaryTest.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/test/java/org/apache/accumulo/monitor/servlets/trace/SummaryTest.java b/server/monitor/src/test/java/org/apache/accumulo/monitor/servlets/trace/SummaryTest.java
new file mode 100644
index 0000000..23cdc0b
--- /dev/null
+++ b/server/monitor/src/test/java/org/apache/accumulo/monitor/servlets/trace/SummaryTest.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.accumulo.monitor.servlets.trace;
+
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * 
+ */
+public class SummaryTest {
+
+  private Summary summary;
+
+  @Before
+  public void setup() {
+    summary = new Summary();
+  }
+
+  @Test
+  public void testRangeValues() {
+    summary.getRangeForTrace(10);
+    summary.getRangeForTrace(100);
+    summary.getRangeForTrace(4990000);
+    summary.getRangeForTrace(Long.MAX_VALUE);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/89d64c5b/server/src/test/java/org/apache/accumulo/server/monitor/servlets/trace/SummaryTest.java
----------------------------------------------------------------------
diff --git a/server/src/test/java/org/apache/accumulo/server/monitor/servlets/trace/SummaryTest.java b/server/src/test/java/org/apache/accumulo/server/monitor/servlets/trace/SummaryTest.java
deleted file mode 100644
index f983066..0000000
--- a/server/src/test/java/org/apache/accumulo/server/monitor/servlets/trace/SummaryTest.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.accumulo.server.monitor.servlets.trace;
-
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * 
- */
-public class SummaryTest {
-
-  private Summary summary;
-
-  @Before
-  public void setup() {
-    summary = new Summary();
-  }
-
-  @Test
-  public void testRangeValues() {
-    summary.getRangeForTrace(10);
-    summary.getRangeForTrace(100);
-    summary.getRangeForTrace(4990000);
-    summary.getRangeForTrace(Long.MAX_VALUE);
-  }
-
-}


[09/15] git commit: Merge branch '1.4.6-SNAPSHOT' into 1.5.2-SNAPSHOT

Posted by ct...@apache.org.
Merge branch '1.4.6-SNAPSHOT' into 1.5.2-SNAPSHOT


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/fd1ac998
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/fd1ac998
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/fd1ac998

Branch: refs/heads/1.5.2-SNAPSHOT
Commit: fd1ac9981bba9ec4e82e658e1ec60eee35d60bda
Parents: c62d676 92c4171
Author: Christopher Tubbs <ct...@apache.org>
Authored: Wed Apr 23 10:50:35 2014 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Wed Apr 23 10:50:35 2014 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java | 2 --
 1 file changed, 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/fd1ac998/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
index 09a2d61,0000000..f26aaef
mode 100644,000000..100644
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
@@@ -1,81 -1,0 +1,79 @@@
 +/**
 + * Licensed to the Apache Software Foundation (ASF) under one or more
 + * contributor license agreements.  See the NOTICE file distributed with
 + * this work for additional information regarding copyright ownership.
 + * The ASF licenses this file to You under the Apache License, Version 2.0
 + * (the "License"); you may not use this file except in compliance with
 + * the License.  You may obtain a copy of the License at
 + *
 + *     http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an "AS IS" BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +package org.apache.accumulo.core.file.rfile;
 +
 +import java.util.ArrayList;
 +import java.util.Arrays;
 +import java.util.List;
 +
 +import org.apache.accumulo.core.cli.Help;
 +import org.apache.accumulo.core.conf.DefaultConfiguration;
 +import org.apache.accumulo.core.file.FileSKVWriter;
- import org.apache.accumulo.core.file.rfile.RFile.Writer;
 +import org.apache.accumulo.core.file.rfile.bcfile.TFile;
 +import org.apache.accumulo.core.util.CachedConfiguration;
 +import org.apache.hadoop.conf.Configuration;
- import org.apache.hadoop.fs.FileSystem;
 +import org.apache.hadoop.fs.Path;
 +
 +import com.beust.jcommander.IParameterValidator;
 +import com.beust.jcommander.Parameter;
 +import com.beust.jcommander.ParameterException;
 +
 +/**
 + * Create an empty RFile for use in recovering from data loss where Accumulo still refers internally to a path.
 + */
 +public class CreateEmpty {
 +
 +  public static class NamedLikeRFile implements IParameterValidator {
 +    @Override
 +    public void validate(String name, String value) throws ParameterException {
 +      if (!value.endsWith(".rf")) {
 +        throw new ParameterException("File must end with .rf and '" + value + "' does not.");
 +      }
 +    }
 +  }
 +
 +  public static class IsSupportedCompressionAlgorithm implements IParameterValidator {
 +    @Override
 +    public void validate(String name, String value) throws ParameterException {
 +      String[] algorithms = TFile.getSupportedCompressionAlgorithms();
 +      if (!((Arrays.asList(algorithms)).contains(value))) {
 +        throw new ParameterException("Compression codec must be one of " + Arrays.toString(TFile.getSupportedCompressionAlgorithms()));
 +      }
 +    }
 +  }
 +
 +  static class Opts extends Help {
 +    @Parameter(names = {"-c", "--codec"}, description = "the compression codec to use.", validateWith = IsSupportedCompressionAlgorithm.class)
 +    String codec = TFile.COMPRESSION_NONE;
 +    @Parameter(description = " <path> { <path> ... } Each path given is a URL. Relative paths are resolved according to the default filesystem defined in your Hadoop configuration, which is usually an HDFS instance.", required = true, validateWith = NamedLikeRFile.class)
 +    List<String> files = new ArrayList<String>();
 +  }
 +
 +  public static void main(String[] args) throws Exception {
 +    Configuration conf = CachedConfiguration.getInstance();
 +
 +    Opts opts = new Opts();
 +    opts.parseArgs(CreateEmpty.class.getName(), args);
 +
 +    for (String arg : opts.files) {
 +      Path path = new Path(arg);
 +      FileSKVWriter writer = (new RFileOperations()).openWriter(arg, path.getFileSystem(conf), conf, DefaultConfiguration.getDefaultConfiguration(), opts.codec);
 +      writer.close();
 +    }
 +  }
 +
 +}