Return-Path: X-Original-To: apmail-accumulo-commits-archive@www.apache.org Delivered-To: apmail-accumulo-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D664A10C36 for ; Thu, 20 Mar 2014 15:25:49 +0000 (UTC) Received: (qmail 63910 invoked by uid 500); 20 Mar 2014 15:25:47 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 63801 invoked by uid 500); 20 Mar 2014 15:25:45 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 61308 invoked by uid 99); 20 Mar 2014 15:25:19 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Mar 2014 15:25:19 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 052129861D7; Thu, 20 Mar 2014 15:25:19 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: elserj@apache.org To: commits@accumulo.apache.org Date: Thu, 20 Mar 2014 15:25:25 -0000 Message-Id: <34f7a2f7fb6c4b1ba25c2d1dcab62733@git.apache.org> In-Reply-To: <6929a2d892494d1ca55f54f78759a16a@git.apache.org> References: <6929a2d892494d1ca55f54f78759a16a@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [08/20] git commit: ACCUMULO-2437 Add javadoc for addSplits that documents the workaround using Text's byte[] constructor. ACCUMULO-2437 Add javadoc for addSplits that documents the workaround using Text's byte[] constructor. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/205f0dca Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/205f0dca Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/205f0dca Branch: refs/heads/ACCUMULO-2061 Commit: 205f0dca8cc86d2c8ecab710719cfb7682920ed1 Parents: 082adbf Author: Sean Busbey Authored: Tue Mar 18 03:16:27 2014 -0500 Committer: Sean Busbey Committed: Tue Mar 18 03:23:55 2014 -0500 ---------------------------------------------------------------------- .../core/client/admin/TableOperations.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/205f0dca/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java index c47d6a5..2521c96 100644 --- a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java +++ b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java @@ -135,6 +135,23 @@ public interface TableOperations { public void exportTable(String tableName, String exportDir) throws TableNotFoundException, AccumuloException, AccumuloSecurityException; /** + * Ensures that tablets are split along a set of keys. + *

+ * Note that while the documentation for Text specifies that its bytestream should be UTF-8, the encoding is not enforced by operations that work with byte arrays. + *

+ * For example, you can create 256 evenly-sliced splits via the following code sample even though the given byte sequences are not valid UTF-8. + *

+   * {@code
+   *  TableOperations tableOps = connector.tableOperations();
+   *  TreeSet splits = new TreeSet();
+   *  for (int i = 0; i < 256; i++) {
+   *    byte[] bytes = { (byte) i };
+   *    splits.add(new Text(bytes));
+   *  }
+   *  tableOps.addSplits(TABLE_NAME, splits);
+   * }
+   * 
+ * * @param tableName * the name of the table * @param partitionKeys