Merge branch '1.6.1-SNAPSHOT' Conflicts: server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/8efcbd8f Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/8efcbd8f Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/8efcbd8f Branch: refs/heads/master Commit: 8efcbd8f829d49cfc9e37b147d94354e37f134f8 Parents: ffd2626 079ef51 Author: Bill Havanki <bhava...@cloudera.com> Authored: Wed Jun 18 17:27:52 2014 -0400 Committer: Bill Havanki <bhava...@cloudera.com> Committed: Wed Jun 18 17:27:52 2014 -0400 ---------------------------------------------------------------------- .../accumulo/master/tableOps/BulkImport.java | 150 ++++++++++--------- 1 file changed, 76 insertions(+), 74 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/8efcbd8f/server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java ---------------------------------------------------------------------- diff --cc server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java index 06ae7aa,e42fee6..73e0e49 --- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java +++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java @@@ -380,17 -381,17 +382,17 @@@ class CopyFailed extends MasterRepo @Override public Repo<Master> call(long tid, Master master) throws Exception { // This needs to execute after the arbiter is stopped - + VolumeManager fs = master.getFileSystem(); - + if (!fs.exists(new Path(error, BulkImport.FAILURES_TXT))) return new CleanUpBulkImport(tableId, source, bulk, error); - + HashMap<String,String> failures = new HashMap<String,String>(); HashMap<String,String> loadedFailures = new HashMap<String,String>(); - + FSDataInputStream failFile = fs.open(new Path(error, BulkImport.FAILURES_TXT)); - BufferedReader in = new BufferedReader(new InputStreamReader(failFile, Constants.UTF8)); + BufferedReader in = new BufferedReader(new InputStreamReader(failFile, StandardCharsets.UTF_8)); try { String line = null; while ((line = in.readLine()) != null) { @@@ -430,21 -431,21 +432,21 @@@ fs.rename(orig, dest); log.debug("tid " + tid + " renamed " + orig + " to " + dest + ": import failed"); } - + if (loadedFailures.size() > 0) { DistributedWorkQueue bifCopyQueue = new DistributedWorkQueue(Constants.ZROOT + "/" + HdfsZooInstance.getInstance().getInstanceID() - + Constants.ZBULK_FAILED_COPYQ); + + Constants.ZBULK_FAILED_COPYQ, master.getConfiguration().getConfiguration()); - + HashSet<String> workIds = new HashSet<String>(); - + for (String failure : loadedFailures.values()) { Path orig = new Path(failure); Path dest = new Path(error, orig.getName()); - + if (fs.exists(dest)) continue; - + - bifCopyQueue.addWork(orig.getName(), (failure + "," + dest).getBytes(Constants.UTF8)); + bifCopyQueue.addWork(orig.getName(), (failure + "," + dest).getBytes(StandardCharsets.UTF_8)); workIds.add(orig.getName()); log.debug("tid " + tid + " added to copyq: " + orig + " to " + dest + ": failed"); } @@@ -576,9 -577,9 +578,9 @@@ class LoadFiles extends MasterRepo UtilWaitThread.sleep(100); } } - + FSDataOutputStream failFile = fs.create(new Path(errorDir, BulkImport.FAILURES_TXT), true); - BufferedWriter out = new BufferedWriter(new OutputStreamWriter(failFile, Constants.UTF8)); + BufferedWriter out = new BufferedWriter(new OutputStreamWriter(failFile, StandardCharsets.UTF_8)); try { for (String f : filesToLoad) { out.write(f);