Author: kturner
Date: Wed Apr 4 20:41:24 2012
New Revision: 1309586
URL: http://svn.apache.org/viewvc?rev=1309586&view=rev
Log:
ACCUMULO-515 Added utility to generate split points for continuous ingest.
Added:
accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/continuous/GenSplits.java
Modified:
accumulo/trunk/test/system/continuous/README
Added:
accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/continuous/GenSplits.java
URL:
http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/continuous/GenSplits.java?rev=1309586&view=auto
==============================================================================
---
accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/continuous/GenSplits.java
(added)
+++
accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/continuous/GenSplits.java
Wed Apr 4 20:41:24 2012
@@ -0,0 +1,52 @@
+/**
+ * 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.test.continuous;
+
+/**
+ *
+ */
+public class GenSplits {
+ public static void main(String[] args) {
+
+ if (args.length != 1) {
+ System.err.println("Usage: " + GenSplits.class.getName() + " <num
tablets>");
+ System.exit(-1);
+ }
+
+ int numTablets = Integer.parseInt(args[0]);
+
+ if (numTablets < 1) {
+ System.err.println("ERROR: numTablets < 1");
+ System.exit(-1);
+ }
+
+ int numSplits = numTablets - 1;
+ long distance = (Long.MAX_VALUE / numTablets) + 1;
+ long split = distance;
+ for (int i = 0; i < numSplits; i++) {
+
+ String s = String.format("%016x", split);
+
+ while (s.charAt(s.length() - 1) == '0') {
+ s = s.substring(0, s.length() - 1);
+ }
+
+ System.out.println(s);
+ split += distance;
+ }
+ }
+}
Modified: accumulo/trunk/test/system/continuous/README
URL:
http://svn.apache.org/viewvc/accumulo/trunk/test/system/continuous/README?rev=1309586&r1=1309585&r2=1309586&view=diff
==============================================================================
--- accumulo/trunk/test/system/continuous/README (original)
+++ accumulo/trunk/test/system/continuous/README Wed Apr 4 20:41:24 2012
@@ -5,6 +5,8 @@ statistics in order to understand how ac
copy all of the .example files and modify them. These scripts rely on pssh.
Before running any script you may need to use pssh to create the log directory
on
each machine if you want it local. Also, create the table "ci" before running.
+You can run org.apache.accumulo.server.test.continuous.GenSplits to generate
+splits points for a continuous ingest table.
The following ingest scripts inserts data into accumulo that will form a random
graph.