git commit: ACCUMULO-1664 fix ReadWriteIT's access to monitor page

2013-09-13 Thread billie
Updated Branches:
  refs/heads/master 8f6821171 -> 132a272eb


ACCUMULO-1664 fix ReadWriteIT's access to monitor page


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

Branch: refs/heads/master
Commit: 132a272eba9208b881b775851e63764f84c3f46a
Parents: 8f68211
Author: Billie Rinaldi 
Authored: Fri Sep 13 16:17:10 2013 -0700
Committer: Billie Rinaldi 
Committed: Fri Sep 13 16:18:05 2013 -0700

--
 .../apache/accumulo/test/functional/AbstractMacIT.java  | 12 
 .../apache/accumulo/test/functional/ReadWriteIT.java|  4 +---
 2 files changed, 13 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/132a272e/test/src/test/java/org/apache/accumulo/test/functional/AbstractMacIT.java
--
diff --git 
a/test/src/test/java/org/apache/accumulo/test/functional/AbstractMacIT.java 
b/test/src/test/java/org/apache/accumulo/test/functional/AbstractMacIT.java
index 6ea4452..f1a651d 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/AbstractMacIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/AbstractMacIT.java
@@ -19,13 +19,19 @@ package org.apache.accumulo.test.functional;
 import java.io.IOException;
 import java.util.concurrent.atomic.AtomicInteger;
 
+import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.cli.BatchWriterOpts;
 import org.apache.accumulo.core.cli.ScannerOpts;
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.Connector;
+import org.apache.accumulo.core.client.Instance;
+import org.apache.accumulo.core.client.ZooKeeperInstance;
+import org.apache.accumulo.core.zookeeper.ZooUtil;
+import org.apache.accumulo.fate.zookeeper.ZooReader;
 import org.apache.accumulo.minicluster.MiniAccumuloCluster;
 import org.apache.log4j.Logger;
+import org.apache.zookeeper.KeeperException;
 import org.junit.rules.TemporaryFolder;
 
 public abstract class AbstractMacIT {
@@ -55,6 +61,12 @@ public abstract class AbstractMacIT {
 return getCluster().getConnector("root", ROOT_PASSWORD);
   }
   
+  public String getMonitor() throws KeeperException, InterruptedException {
+Instance instance = new ZooKeeperInstance(getCluster().getInstanceName(), 
getCluster().getZooKeepers());
+ZooReader zr = new ZooReader(getCluster().getZooKeepers(), 5000);
+return new String(zr.getData(ZooUtil.getRoot(instance) + 
Constants.ZMONITOR, null));
+  }
+  
   public String rootPath() {
 return getCluster().getConfig().getDir().getAbsolutePath();
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/132a272e/test/src/test/java/org/apache/accumulo/test/functional/ReadWriteIT.java
--
diff --git 
a/test/src/test/java/org/apache/accumulo/test/functional/ReadWriteIT.java 
b/test/src/test/java/org/apache/accumulo/test/functional/ReadWriteIT.java
index 8cad540..856f0c7 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/ReadWriteIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/ReadWriteIT.java
@@ -20,7 +20,6 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
-import java.net.InetAddress;
 import java.net.URL;
 import java.util.Collections;
 import java.util.HashSet;
@@ -38,7 +37,6 @@ 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.conf.Property;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Range;
@@ -70,7 +68,7 @@ public class ReadWriteIT extends ConfigurableMacIT {
 Connector connector = getConnector();
 ingest(connector, ROWS, COLS, 50, 0);
 verify(connector, ROWS, COLS, 50, 0);
-URL url = new URL("http://"; + InetAddress.getLocalHost().getHostName() + 
":" + cluster.getConfig().getSiteConfig().get(Property.MONITOR_PORT.getKey()));
+URL url = new URL("http://"; + getMonitor());
 log.debug("Fetching web page " + url);
 String result = FunctionalTestUtils.readAll(url.openStream());
 assertTrue(result.length() > 100);



git commit: ACCUMULO-1452, ACCUMULO-1502 Remove warnings introduced previously

2013-09-13 Thread ctubbsii
Updated Branches:
  refs/heads/master eb5e5a489 -> 8f6821171


ACCUMULO-1452, ACCUMULO-1502 Remove warnings introduced previously


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

Branch: refs/heads/master
Commit: 8f68211710cb948640201e65671ac07551d061d1
Parents: eb5e5a4
Author: Christopher Tubbs 
Authored: Fri Sep 13 17:37:39 2013 -0400
Committer: Christopher Tubbs 
Committed: Fri Sep 13 17:37:39 2013 -0400

--
 .../examples/simple/client/TracingExample.java  | 202 +--
 .../accumulo/test/functional/CleanTmpIT.java|  16 +-
 2 files changed, 102 insertions(+), 116 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/8f682117/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/TracingExample.java
--
diff --git 
a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/TracingExample.java
 
b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/TracingExample.java
index 5eb2597..a542263 100644
--- 
a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/TracingExample.java
+++ 
b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/TracingExample.java
@@ -17,7 +17,6 @@
 
 package org.apache.accumulo.examples.simple.client;
 
-import java.io.IOException;
 import java.util.Map.Entry;
 
 import org.apache.accumulo.core.cli.ClientOnDefaultTable;
@@ -42,113 +41,102 @@ import com.beust.jcommander.Parameter;
 
 /**
  * A simple example showing how to use the distributed tracing API in client 
code
- *
+ * 
  */
 public class TracingExample {
-   
-   private static final String DEFAULT_TABLE_NAME = "test";
-   
-   static class Opts extends ClientOnDefaultTable {
-   @Parameter(names = {"-C", "--createtable"}, description = "create 
table before doing anything")
-   boolean createtable = false;
-   @Parameter(names = {"-D", "--deletetable"}, description = "delete 
table when finished")
-   boolean deletetable = false;
-   @Parameter(names = {"-c", "--create"}, description = "create 
entries before any deletes")
-   boolean createEntries = false;
-   @Parameter(names = {"-r", "--read"}, description = "read entries 
after any creates/deletes")
-   boolean readEntries = false;
-   
-   public Opts() {
- super(DEFAULT_TABLE_NAME);
- auths = new Authorizations();
-   }
- }
-   
-   public void enableTracing(Opts opts) throws Exception {
-   DistributedTrace.enable(opts.getInstance(), new 
ZooReader(opts.getInstance().getZooKeepers(), 1000), "myHost", "myApp");
-   }
-   
-   public void execute(Opts opts) throws TableNotFoundException, 
InterruptedException, AccumuloException, AccumuloSecurityException, 
TableExistsException {
-   
-   if (opts.createtable) {
-   
opts.getConnector().tableOperations().create(opts.getTableName());
-   }
-   
-   if (opts.createEntries) {
-   createEntries(opts);
-   }
-   
-   if (opts.readEntries) {
-   readEntries(opts);
-   }
-   
-   if (opts.deletetable) {
-   
opts.getConnector().tableOperations().delete(opts.getTableName());
-   }
-   }
-   
-   private void createEntries(Opts opts) throws TableNotFoundException, 
AccumuloException, AccumuloSecurityException {
-   
-   // Trace the write operation. Note, unless you flush the 
BatchWriter, you will not capture
-   // the write operation as it is occurs asynchronously. You can 
optionally create additional Spans
-   // within a given Trace as seen below around the flush
-   Trace.on("Client Write");
-
-   System.out.println("TraceID: " + 
Long.toHexString(Trace.currentTrace().traceId()));
-   BatchWriter batchWriter = 
opts.getConnector().createBatchWriter(opts.getTableName(), new 
BatchWriterConfig());
-   
-   Mutation m = new Mutation("row");
-   m.put("cf", "cq", "value");
-   
-   batchWriter.addMutation(m);
-   Span flushSpan = Trace.start("Client Flush");
-   batchWriter.flush();
-   flushSpan.stop();
-   
-   // Use Trace.offNoFlush() if you don't want the operation to block.
-   batchWriter.close();
-   Trace.off();
-   }
-   
-   private void read

[1/4] git commit: ACCUMULO-1452 remove tmp files after needsMajorCompation is callable

2013-09-13 Thread ecn
Updated Branches:
  refs/heads/1.4.5-SNAPSHOT 3a414da6a -> 8f35d25c6
  refs/heads/1.5.1-SNAPSHOT ad8cbcbc9 -> 4f2516e6b


ACCUMULO-1452 remove tmp files after needsMajorCompation is callable


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

Branch: refs/heads/1.4.5-SNAPSHOT
Commit: 8f35d25c6daa7026a34cc322f30d740a7de8c0c2
Parents: 3a414da
Author: Eric Newton 
Authored: Fri Sep 13 11:43:17 2013 -0400
Committer: Eric Newton 
Committed: Fri Sep 13 11:43:17 2013 -0400

--
 .../org/apache/accumulo/server/tabletserver/Tablet.java | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/8f35d25c/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
--
diff --git 
a/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java 
b/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
index 9c26568..8da2297 100644
--- 
a/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
+++ 
b/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
@@ -1481,12 +1481,6 @@ public class Tablet {
   + " entries created)");
 }
 
-// look for hints of a failure on the previous tablet server
-if (!logEntries.isEmpty() || 
needsMajorCompaction(MajorCompactionReason.NORMAL)) {
-  // look for any temp files hanging around
-  removeOldTemporaryFiles();
-}
-
 // do this last after tablet is completely setup because it
 // could cause major compaction to start
 datafileManager = new DatafileManager(datafiles);
@@ -1495,6 +1489,12 @@ public class Tablet {
 
 datafileManager.removeFilesAfterScanRel(scanFiles);
 
+// look for hints of a failure on the previous tablet server
+if (!logEntries.isEmpty() || 
needsMajorCompaction(MajorCompactionReason.NORMAL)) {
+  // look for any temp files hanging around
+  removeOldTemporaryFiles();
+}
+
 log.log(TLevel.TABLET_HIST, extent + " opened ");
   }
   



[4/4] git commit: ACCUMULO-1452 remove tmp files after needsMajorCompation is callable

2013-09-13 Thread ecn
ACCUMULO-1452 remove tmp files after needsMajorCompation is callable


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

Branch: refs/heads/1.5.1-SNAPSHOT
Commit: 4f2516e6b04595f250524e1d13c181c281bbd2d3
Parents: ad8cbcb 8f35d25
Author: Eric Newton 
Authored: Fri Sep 13 11:44:21 2013 -0400
Committer: Eric Newton 
Committed: Fri Sep 13 11:44:21 2013 -0400

--
 .../accumulo/server/tabletserver/Tablet.java  | 18 --
 1 file changed, 12 insertions(+), 6 deletions(-)
--




[2/4] git commit: ACCUMULO-1452 remove tmp files after needsMajorCompation is callable

2013-09-13 Thread ecn
ACCUMULO-1452 remove tmp files after needsMajorCompation is callable


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

Branch: refs/heads/1.5.1-SNAPSHOT
Commit: 8f35d25c6daa7026a34cc322f30d740a7de8c0c2
Parents: 3a414da
Author: Eric Newton 
Authored: Fri Sep 13 11:43:17 2013 -0400
Committer: Eric Newton 
Committed: Fri Sep 13 11:43:17 2013 -0400

--
 .../org/apache/accumulo/server/tabletserver/Tablet.java | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/8f35d25c/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
--
diff --git 
a/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java 
b/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
index 9c26568..8da2297 100644
--- 
a/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
+++ 
b/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
@@ -1481,12 +1481,6 @@ public class Tablet {
   + " entries created)");
 }
 
-// look for hints of a failure on the previous tablet server
-if (!logEntries.isEmpty() || 
needsMajorCompaction(MajorCompactionReason.NORMAL)) {
-  // look for any temp files hanging around
-  removeOldTemporaryFiles();
-}
-
 // do this last after tablet is completely setup because it
 // could cause major compaction to start
 datafileManager = new DatafileManager(datafiles);
@@ -1495,6 +1489,12 @@ public class Tablet {
 
 datafileManager.removeFilesAfterScanRel(scanFiles);
 
+// look for hints of a failure on the previous tablet server
+if (!logEntries.isEmpty() || 
needsMajorCompaction(MajorCompactionReason.NORMAL)) {
+  // look for any temp files hanging around
+  removeOldTemporaryFiles();
+}
+
 log.log(TLevel.TABLET_HIST, extent + " opened ");
   }
   



[1/5] git commit: ACCUMULO-1452 remove tmp files after needsMajorCompation is callable

2013-09-13 Thread ecn
Updated Branches:
  refs/heads/master 46b49658b -> eb5e5a489


ACCUMULO-1452 remove tmp files after needsMajorCompation is callable


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

Branch: refs/heads/master
Commit: 8f35d25c6daa7026a34cc322f30d740a7de8c0c2
Parents: 3a414da
Author: Eric Newton 
Authored: Fri Sep 13 11:43:17 2013 -0400
Committer: Eric Newton 
Committed: Fri Sep 13 11:43:17 2013 -0400

--
 .../org/apache/accumulo/server/tabletserver/Tablet.java | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/8f35d25c/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
--
diff --git 
a/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java 
b/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
index 9c26568..8da2297 100644
--- 
a/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
+++ 
b/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
@@ -1481,12 +1481,6 @@ public class Tablet {
   + " entries created)");
 }
 
-// look for hints of a failure on the previous tablet server
-if (!logEntries.isEmpty() || 
needsMajorCompaction(MajorCompactionReason.NORMAL)) {
-  // look for any temp files hanging around
-  removeOldTemporaryFiles();
-}
-
 // do this last after tablet is completely setup because it
 // could cause major compaction to start
 datafileManager = new DatafileManager(datafiles);
@@ -1495,6 +1489,12 @@ public class Tablet {
 
 datafileManager.removeFilesAfterScanRel(scanFiles);
 
+// look for hints of a failure on the previous tablet server
+if (!logEntries.isEmpty() || 
needsMajorCompaction(MajorCompactionReason.NORMAL)) {
+  // look for any temp files hanging around
+  removeOldTemporaryFiles();
+}
+
 log.log(TLevel.TABLET_HIST, extent + " opened ");
   }
   



[4/5] git commit: Merge branch '1.5.1-SNAPSHOT'

2013-09-13 Thread ecn
Merge branch '1.5.1-SNAPSHOT'


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

Branch: refs/heads/master
Commit: 886e56a3aedac70f453d75d3d641455bb8936a35
Parents: 46b4965 4f2516e
Author: Eric Newton 
Authored: Fri Sep 13 11:44:35 2013 -0400
Committer: Eric Newton 
Committed: Fri Sep 13 11:44:35 2013 -0400

--
 .../accumulo/server/tabletserver/Tablet.java  | 18 --
 1 file changed, 12 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/886e56a3/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
--
diff --cc 
server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
index 5fd9453,4439e74..d33b26c
--- a/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
+++ b/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
@@@ -1427,8 -1480,20 +1421,20 @@@ public class Tablet 
  
  computeNumEntries();
  
 -datafileManager.removeFilesAfterScanRel(scanFiles);
 +datafileManager.removeFilesAfterScan(scanFiles);
  
+ // look for hints of a failure on the previous tablet server
+ if (!logEntries.isEmpty() || 
needsMajorCompaction(MajorCompactionReason.NORMAL)) {
+   // look for any temp files hanging around
+   removeOldTemporaryFiles();
+ }
+ 
+ // look for hints of a failure on the previous tablet server
+ if (!logEntries.isEmpty() || 
needsMajorCompaction(MajorCompactionReason.NORMAL)) {
+   // look for any temp files hanging around
+   removeOldTemporaryFiles();
+ }
+ 
  log.log(TLevel.TABLET_HIST, extent + " opened ");
}




[5/5] git commit: ACCUMULO-1452 merged branches to master, fixed test

2013-09-13 Thread ecn
ACCUMULO-1452 merged branches to master, fixed test


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

Branch: refs/heads/master
Commit: eb5e5a4890c1346bf59be3327b442be76d734a1b
Parents: 886e56a
Author: Eric Newton 
Authored: Fri Sep 13 12:26:24 2013 -0400
Committer: Eric Newton 
Committed: Fri Sep 13 12:26:24 2013 -0400

--
 .../minicluster/MiniAccumuloCluster.java| 19 ++--
 .../minicluster/MiniAccumuloConfig.java |  2 +-
 .../accumulo/server/tabletserver/Tablet.java|  8 +---
 .../accumulo/test/functional/CleanTmpIT.java| 50 +++-
 4 files changed, 57 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/eb5e5a48/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java
--
diff --git 
a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java
 
b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java
index 473fe44..2e061dd 100644
--- 
a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java
+++ 
b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java
@@ -24,6 +24,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.net.InetSocketAddress;
+import java.net.URI;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -58,6 +59,7 @@ import org.apache.accumulo.start.Main;
 import org.apache.accumulo.start.classloader.vfs.MiniDFSUtil;
 import org.apache.commons.io.FileUtils;
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.hdfs.DFSConfigKeys;
 import org.apache.hadoop.hdfs.MiniDFSCluster;
 import org.apache.zookeeper.server.ZooKeeperServerMain;
@@ -124,6 +126,7 @@ public class MiniAccumuloCluster {
   private Set> debugPorts = new 
HashSet>();
 
   private File zooCfgFile;
+  private String dfsUri;
 
   public List getLogWriters() {
 return logWriters;
@@ -245,16 +248,18 @@ public class MiniAccumuloCluster {
 System.setProperty("test.build.data", oldTestBuildData);
   miniDFS.waitClusterUp();
   InetSocketAddress dfsAddress = 
miniDFS.getNameNode().getNameNodeAddress();
-  String uri = "hdfs://" + dfsAddress.getHostName() + ":" + 
dfsAddress.getPort();
+  dfsUri = "hdfs://" + dfsAddress.getHostName() + ":" + 
dfsAddress.getPort();
   File coreFile = new File(config.getConfDir(), "core-site.xml");
-  writeConfig(coreFile, Collections.singletonMap("fs.default.name", 
uri).entrySet());
+  writeConfig(coreFile, Collections.singletonMap("fs.default.name", 
dfsUri).entrySet());
   File hdfsFile = new File(config.getConfDir(), "hdfs-site.xml");
   writeConfig(hdfsFile, conf);
 
   Map siteConfig = config.getSiteConfig();
-  siteConfig.put(Property.INSTANCE_DFS_URI.getKey(), uri);
+  siteConfig.put(Property.INSTANCE_DFS_URI.getKey(), dfsUri);
   siteConfig.put(Property.INSTANCE_DFS_DIR.getKey(), "/accumulo");
   config.setSiteConfig(siteConfig);
+} else {
+  dfsUri = "file://";
 }
 
 File siteFile = new File(config.getConfDir(), "accumulo-site.xml");
@@ -501,4 +506,12 @@ public class MiniAccumuloCluster {
 Instance instance = new ZooKeeperInstance(this.getInstanceName(), 
this.getZooKeepers());
 return instance.getConnector(user, new PasswordToken(passwd));
   }
+  
+  public FileSystem getFileSystem() {
+try {
+  return FileSystem.get(new URI(dfsUri), new Configuration());
+} catch (Exception e) {
+  throw new RuntimeException(e);
+}
+  }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/eb5e5a48/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java
--
diff --git 
a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java
 
b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java
index f8ad3af..0b6c42c 100644
--- 
a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java
+++ 
b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java
@@ -265,7 +265,7 @@ public class MiniAccumuloConfig {
 return zooKeeperDir;
   }
 
-  File getAccumuloDir() {
+  public File getAccumuloDir() {
 return accumuloDir;
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/eb5e5a48/server/src/main/java/org/apache/accumulo/server/tabletser

[3/5] git commit: ACCUMULO-1452 remove tmp files after needsMajorCompation is callable

2013-09-13 Thread ecn
ACCUMULO-1452 remove tmp files after needsMajorCompation is callable


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

Branch: refs/heads/master
Commit: 4f2516e6b04595f250524e1d13c181c281bbd2d3
Parents: ad8cbcb 8f35d25
Author: Eric Newton 
Authored: Fri Sep 13 11:44:21 2013 -0400
Committer: Eric Newton 
Committed: Fri Sep 13 11:44:21 2013 -0400

--
 .../accumulo/server/tabletserver/Tablet.java  | 18 --
 1 file changed, 12 insertions(+), 6 deletions(-)
--