incubator-accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject svn commit: r1242527 - in /incubator/accumulo/trunk: ./ src/core/ src/core/src/main/java/org/apache/accumulo/core/client/mock/ src/core/src/main/java/org/apache/accumulo/core/util/shell/ src/core/src/test/java/org/apache/accumulo/core/util/shell/ src/c...
Date Thu, 09 Feb 2012 21:12:13 GMT
Author: kturner
Date: Thu Feb  9 21:12:12 2012
New Revision: 1242527

URL: http://svn.apache.org/viewvc?rev=1242527&view=rev
Log:
ACCUMULO-303 Applied rest of per table formatter patch.

Added:
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockShell.java
    incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/util/shell/
    incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/util/shell/command/
    incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/util/shell/command/FormatterCommandTest.java
Modified:
    incubator/accumulo/trunk/   (props changed)
    incubator/accumulo/trunk/src/core/   (props changed)
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java
    incubator/accumulo/trunk/src/server/   (props changed)

Propchange: incubator/accumulo/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb  9 21:12:12 2012
@@ -1,3 +1,3 @@
 /incubator/accumulo/branches/1.3:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124,1209526,1209532,1209539,1209541,1209587,1209657,1210518,1210571,1210596,1210598,1213424,1214320,1225006,1227215,1227231,1227611,1228195,1230180,1230736,1231043,1236873
 /incubator/accumulo/branches/1.3.5rc:1209938
-/incubator/accumulo/branches/1.4:1201902-1242502
+/incubator/accumulo/branches/1.4:1201902-1242521

Propchange: incubator/accumulo/trunk/src/core/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb  9 21:12:12 2012
@@ -1,3 +1,3 @@
 /incubator/accumulo/branches/1.3.5rc/src/core:1209938
 /incubator/accumulo/branches/1.3/src/core:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124,1209526,1209532,1209539,1209541,1209587,1209657,1210518,1210571,1210596,1210598,1213424,1214320,1225006,1227215
-/incubator/accumulo/branches/1.4/src/core:1201902-1242502
+/incubator/accumulo/branches/1.4/src/core:1201902-1242521

Added: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockShell.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockShell.java?rev=1242527&view=auto
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockShell.java
(added)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockShell.java
Thu Feb  9 21:12:12 2012
@@ -0,0 +1,134 @@
+/**
+ * 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.client.mock;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Writer;
+
+import jline.ConsoleReader;
+
+import org.apache.accumulo.core.util.shell.Shell;
+import org.apache.commons.cli.CommandLine;
+
+/**
+ * An Accumulo Shell implementation that allows a developer to attach
+ * an InputStream and Writer to the Shell for testing purposes.
+ */
+public class MockShell extends Shell {
+  private static final String NEWLINE = "\n";
+  
+  protected InputStream in;
+  protected Writer writer;
+  
+  public MockShell(InputStream in, Writer writer) throws IOException {
+    super();
+    this.in = in;
+    this.writer = writer;
+  }
+  
+  public void config(String... args) {
+    super.config(args);
+    
+    // Update the ConsoleReader with the input and output "redirected"
+    try {
+      this.reader = new ConsoleReader(in, writer);
+    }
+    catch (Exception e) {
+      printException(e);
+      configError = true;
+    }
+    
+    // Don't need this for testing purposes
+    this.reader.setUseHistory(false);
+    this.reader.setUsePagination(false);
+    
+    // Make the parsing from the client easier;
+    this.verbose = false;
+  }
+
+  @Override
+  protected void setInstance(CommandLine cl) {
+    // We always want a MockInstance for this test
+    instance = new MockInstance();
+  }
+  
+  public int start() throws IOException {
+    if (configError)
+      return 1;
+    
+    String input;
+    if (isVerbose())
+      printInfo();
+    
+    if (execFile != null) {
+      java.util.Scanner scanner = new java.util.Scanner(new File(execFile));
+      while (scanner.hasNextLine())
+        execCommand(scanner.nextLine(), true, isVerbose());
+    } else if (execCommand != null) {
+      for (String command : execCommand.split("\n")) {
+        execCommand(command, true, isVerbose());
+      }
+      return exitCode;
+    }
+    
+    while (true) {
+      if (exit)
+        return exitCode;
+      
+      reader.setDefaultPrompt(getDefaultPrompt());
+      input = reader.readLine();
+      if (input == null) {
+        reader.printNewline();
+        return exitCode;
+      } // user canceled
+      
+      execCommand(input, false, false);
+    }
+  }
+  
+  /**
+   * @param in the in to set
+   */
+  public void setConsoleInputStream(InputStream in) {
+    this.in = in;
+  }
+
+  /**
+   * @param writer the writer to set
+   */
+  public void setConsoleWriter(Writer writer) {
+    this.writer = writer;
+  }
+  
+  /**
+   * Convenience method to create the byte-array to hand to the console
+   * @param commands Array of commands to run
+   * @return
+   */
+  public static ByteArrayInputStream makeCommands(String... commands) {
+    StringBuilder sb = new StringBuilder(commands.length * 8);
+    
+    for (String command : commands) {
+      sb.append(command).append(NEWLINE);
+    }
+    
+    return new ByteArrayInputStream(sb.toString().getBytes());
+  }
+}

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java?rev=1242527&r1=1242526&r2=1242527&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java
(original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java
Thu Feb  9 21:12:12 2012
@@ -148,7 +148,7 @@ import org.apache.log4j.Logger;
 /**
  * A convenient console interface to perform basic accumulo functions Includes auto-complete,
help, and quoted strings with escape sequences
  */
-public class Shell {
+public class Shell extends ShellOptions {
   public static final Logger log = Logger.getLogger(Shell.class);
   private static final Logger audit = Logger.getLogger(Shell.class.getName() + ".audit");
   
@@ -156,35 +156,28 @@ public class Shell {
   private static final String SHELL_DESCRIPTION = "Shell - Accumulo Interactive Shell";
   private static final String DEFAULT_AUTH_TIMEOUT = "60"; // in minutes
   
-  private int exitCode = 0;
+  protected int exitCode = 0;
   private String tableName;
-  private Instance instance;
+  protected Instance instance;
   private Connector connector;
-  private ConsoleReader reader;
+  protected ConsoleReader reader;
   private AuthInfo credentials;
   private Class<? extends Formatter> defaultFormatterClass = DefaultFormatter.class;
   private Class<? extends Formatter> binaryFormatterClass = BinaryFormatter.class;
-  private Map<String,Class<? extends Formatter>> tableFormatters = new HashMap<String,Class<?
extends Formatter>>();
   public Map<String,List<IteratorSetting>> scanIteratorOptions = new HashMap<String,List<IteratorSetting>>();
   
   private Token rootToken;
   public final Map<String,Command> commandFactory = new TreeMap<String,Command>();
-  private boolean configError = false;
-  
-  // Global options flags
-  public static final String userOption = "u";
-  public static final String tableOption = "t";
-  public static final String helpOption = "?";
-  public static final String helpLongOption = "help";
+  protected boolean configError = false;
   
   // exit if true
-  private boolean exit = false;
+  protected boolean exit = false;
   
   // file to execute commands from
-  private String execFile = null;
+  protected String execFile = null;
   // single command to execute from the command line
-  private String execCommand = null;
-  private boolean verbose = true;
+  protected String execCommand = null;
+  protected boolean verbose = true;
   
   private boolean tabCompletion;
   private boolean disableAuthTimeout;
@@ -192,76 +185,17 @@ public class Shell {
   private long lastUserActivity = System.currentTimeMillis();
   
   public Shell() throws IOException {
+    super();
     this.reader = new ConsoleReader();
   }
   
   public Shell(ConsoleReader reader) {
+    super();
     this.reader = reader;
   }
   
-  @SuppressWarnings("deprecation")
   // Not for client use
   public void config(String... args) {
-    Options opts = new Options();
-    
-    Option usernameOption = new Option("u", "user", true, "username (defaults to your OS
user)");
-    usernameOption.setArgName("user");
-    opts.addOption(usernameOption);
-    
-    Option passwOption = new Option("p", "password", true, "password (prompt for password
if this option is missing)");
-    passwOption.setArgName("pass");
-    opts.addOption(passwOption);
-    
-    Option tabCompleteOption = new Option(null, "disable-tab-completion", false, "disables
tab completion (for less overhead when scripting)");
-    opts.addOption(tabCompleteOption);
-    
-    Option debugOption = new Option(null, "debug", false, "enables client debugging");
-    opts.addOption(debugOption);
-    
-    Option fakeOption = new Option(null, "fake", false, "fake a connection to accumulo");
-    opts.addOption(fakeOption);
-    
-    Option helpOpt = new Option(helpOption, helpLongOption, false, "display this help");
-    opts.addOption(helpOpt);
-    
-    Option execCommandOpt = new Option("e", "execute-command", true, "executes a command,
and then exits");
-    opts.addOption(execCommandOpt);
-    
-    OptionGroup execFileGroup = new OptionGroup();
-    
-    Option execfileOption = new Option("f", "execute-file", true, "executes commands from
a file at startup");
-    execfileOption.setArgName("file");
-    execFileGroup.addOption(execfileOption);
-    
-    Option execfileVerboseOption = new Option("fv", "execute-file-verbose", true, "executes
commands from a file at startup, with commands shown");
-    execfileVerboseOption.setArgName("file");
-    execFileGroup.addOption(execfileVerboseOption);
-    
-    opts.addOptionGroup(execFileGroup);
-    
-    OptionGroup instanceOptions = new OptionGroup();
-    
-    Option hdfsZooInstance = new Option("h", "hdfsZooInstance", false, "use hdfs zoo instance");
-    instanceOptions.addOption(hdfsZooInstance);
-    
-    Option zooKeeperInstance = new Option("z", "zooKeeperInstance", true, "use a zookeeper
instance with the given instance name and list of zoo hosts");
-    zooKeeperInstance.setArgName("name hosts");
-    zooKeeperInstance.setArgs(2);
-    instanceOptions.addOption(zooKeeperInstance);
-    
-    opts.addOptionGroup(instanceOptions);
-    
-    OptionGroup authTimeoutOptions = new OptionGroup();
-    
-    Option authTimeoutOpt = new Option(null, "auth-timeout", true, "minutes the shell can
be idle without re-entering a password (default "
-        + DEFAULT_AUTH_TIMEOUT + " min)");
-    authTimeoutOpt.setArgName("minutes");
-    authTimeoutOptions.addOption(authTimeoutOpt);
-    
-    Option disableAuthTimeoutOpt = new Option(null, "disable-auth-timeout", false, "disables
requiring the user to re-type a password after being idle");
-    authTimeoutOptions.addOption(disableAuthTimeoutOpt);
-    
-    opts.addOptionGroup(authTimeoutOptions);
     
     CommandLine cl;
     try {
@@ -298,18 +232,8 @@ public class Shell {
     String passw = cl.getOptionValue(passwOption.getOpt(), null);
     tabCompletion = !cl.hasOption(tabCompleteOption.getLongOpt());
     
-    // should only be one instance option set
-    instance = null;
-    if (cl.hasOption(fakeOption.getLongOpt())) {
-      instance = new MockInstance();
-    } else if (cl.hasOption(hdfsZooInstance.getOpt())) {
-      instance = getDefaultInstance(AccumuloConfiguration.getSiteConfiguration());
-    } else if (cl.hasOption(zooKeeperInstance.getOpt())) {
-      String[] zkOpts = cl.getOptionValues(zooKeeperInstance.getOpt());
-      instance = new ZooKeeperInstance(zkOpts[0], zkOpts[1]);
-    } else {
-      instance = getDefaultInstance(AccumuloConfiguration.getSiteConfiguration());
-    }
+    // Use a fake (Mock), ZK, or HdfsZK Accumulo instance
+    setInstance(cl);
     
     // process default parameters if unspecified
     byte[] pass;
@@ -372,6 +296,22 @@ public class Shell {
     }
   }
   
+  @SuppressWarnings("deprecation")
+  protected void setInstance(CommandLine cl) {
+    // should only be one instance option set
+    instance = null;
+    if (cl.hasOption(fakeOption.getLongOpt())) {
+      instance = new MockInstance();
+    } else if (cl.hasOption(hdfsZooInstance.getOpt())) {
+      instance = getDefaultInstance(AccumuloConfiguration.getSiteConfiguration());
+    } else if (cl.hasOption(zooKeeperInstance.getOpt())) {
+      String[] zkOpts = cl.getOptionValues(zooKeeperInstance.getOpt());
+      instance = new ZooKeeperInstance(zkOpts[0], zkOpts[1]);
+    } else {
+      instance = getDefaultInstance(AccumuloConfiguration.getSiteConfiguration());
+    }
+  }
+  
   /**
    * @deprecated Not for client use
    */
@@ -466,14 +406,6 @@ public class Shell {
     else
       sb.append("- Authorization timeout: ").append(String.format("%.2fs\n", authTimeout
/ 1000.0));
     sb.append("- Debug: ").append(isDebuggingEnabled() ? "on" : "off").append("\n");
-    if (!tableFormatters.isEmpty()) {
-      sb.append("- Active Formatters");
-      for (Entry<String,Class<? extends Formatter>> entry : tableFormatters.entrySet())
{
-        if (null != entry.getValue()) {
-          sb.append("-    Table: ").append(entry.getKey()).append(", ").append(entry.getValue().getName()).append("\n");
-        }
-      }
-    }
     if (!scanIteratorOptions.isEmpty()) {
       for (Entry<String,List<IteratorSetting>> entry : scanIteratorOptions.entrySet())
{
         sb.append("- Session scan iterators for table ").append(entry.getKey()).append(":\n");
@@ -491,7 +423,7 @@ public class Shell {
     reader.printString(sb.toString());
   }
   
-  private String getDefaultPrompt() {
+  protected String getDefaultPrompt() {
     return connector.whoami() + "@" + connector.getInstance().getInstanceName() + (getTableName().isEmpty()
? "" : " ") + getTableName() + "> ";
   }
   
@@ -1007,10 +939,6 @@ public class Shell {
   public AuthInfo getCredentials() {
     return credentials;
   }
-  
-  public void setFormatterClass(String tableName, Class<? extends Formatter> formatter)
{
-    this.tableFormatters.put(tableName, formatter);
-  }
 
   /**
    * Return the formatter for this table, .

Added: incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/util/shell/command/FormatterCommandTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/util/shell/command/FormatterCommandTest.java?rev=1242527&view=auto
==============================================================================
--- incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/util/shell/command/FormatterCommandTest.java
(added)
+++ incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/util/shell/command/FormatterCommandTest.java
Thu Feb  9 21:12:12 2012
@@ -0,0 +1,217 @@
+/**
+ * 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.util.shell.command;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.util.Iterator;
+import java.util.Map.Entry;
+
+import junit.framework.Assert;
+
+import org.apache.accumulo.core.client.AccumuloException;
+import org.apache.accumulo.core.client.AccumuloSecurityException;
+import org.apache.accumulo.core.client.TableExistsException;
+import org.apache.accumulo.core.client.mock.MockShell;
+import org.apache.accumulo.core.data.Key;
+import org.apache.accumulo.core.data.Value;
+import org.apache.accumulo.core.util.format.Formatter;
+import org.apache.accumulo.core.util.shell.Shell;
+import org.apache.commons.lang.StringUtils;
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
+import org.junit.Test;
+
+/**
+ * Uses the MockShell to test the shell output with Formatters
+ */
+public class FormatterCommandTest {
+  Writer writer = null;
+  InputStream in = null;
+  
+  @Test
+  public void test() throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException,
ClassNotFoundException {
+    // Keep the Shell AUDIT log off the test output
+    Logger.getLogger(Shell.class).setLevel(Level.WARN);
+    
+    String[] args = new String[] {"-fake", "-u", "root", "-p", "passwd"};
+   
+    String[] commands = createCommands();
+    
+    in = MockShell.makeCommands(commands);
+    writer = new StringWriter();
+    
+    MockShell shell = new MockShell(in, writer);
+    shell.config(args);
+    
+    // Can't call createtable in the shell with MockAccumulo
+    shell.getConnector().tableOperations().create("test");
+
+    try {
+      shell.start();
+    } catch (Exception e) {
+      System.err.println(e.getMessage());
+      Assert.fail("Exception while running commands: " + e.getMessage());
+    } 
+    
+    shell.getReader().flushConsole();
+    
+    String[] output = StringUtils.split(writer.toString(), '\n');
+   
+    boolean formatterOn = false;
+    
+    String[] expectedDefault = new String[] {
+        "row cf:cq []    1234abcd",
+        "row cf1:cq1 []    9876fedc",
+        "row2 cf:cq []    13579bdf",
+        "row2 cf1:cq []    2468ace"
+    };
+    
+    String[] expectedFormatted = new String[] {
+        "row cf:cq []    0x31 0x32 0x33 0x34 0x61 0x62 0x63 0x64",
+        "row cf1:cq1 []    0x39 0x38 0x37 0x36 0x66 0x65 0x64 0x63",
+        "row2 cf:cq []    0x31 0x33 0x35 0x37 0x39 0x62 0x64 0x66",
+        "row2 cf1:cq []    0x32 0x34 0x36 0x38 0x61 0x63 0x65"
+    };
+    
+    int outputIndex = 0;
+    while (outputIndex < output.length) {
+      String line = output[outputIndex];
+      
+      if (line.startsWith("root@mock-instance")) {
+        if (line.contains("formatter -t test -f org.apache.accumulo.core.util.shell.command.FormatterCommandTest$HexFormatter"))
{
+          formatterOn = true;
+        }
+       
+        outputIndex++;
+      } else if (line.startsWith("row")) {
+        int expectedIndex = 0;
+        String[] comparisonData;
+        
+        // Pick the type of data we expect (formatted or default)
+        if (formatterOn) {
+          comparisonData = expectedFormatted;
+        } else {
+          comparisonData = expectedDefault;
+        }
+        
+        // Ensure each output is what we expected
+        while (expectedIndex + outputIndex < output.length &&
+            expectedIndex < expectedFormatted.length) {
+          Assert.assertEquals(comparisonData[expectedIndex].trim(), output[expectedIndex
+ outputIndex].trim());
+          
+          expectedIndex++;
+        }
+        
+        outputIndex += expectedIndex;
+      }
+    }
+  }
+  
+  private String[] createCommands() {
+    return new String[] {
+        "table test",
+        "insert row cf cq 1234abcd",
+        "insert row cf1 cq1 9876fedc",
+        "insert row2 cf cq 13579bdf",
+        "insert row2 cf1 cq 2468ace",
+        "scan",
+        "formatter -t test -f org.apache.accumulo.core.util.shell.command.FormatterCommandTest$HexFormatter",
+        "scan"
+    };
+  }
+  
+  /**
+   * <p>Simple <code>Formatter</code> that will convert each character
in the Value
+   * from decimal to hexadecimal. Will automatically skip over characters in the value
+   * which do not fall within the [0-9,a-f] range.</p>
+   * 
+   * <p>Example: <code>'0'</code> will be displayed as <code>'0x30'</code></p>
+   */
+  public static class HexFormatter implements Formatter {
+    private Iterator<Entry<Key, Value>> iter = null;
+    private boolean printTs = false;
+
+    private final String tab = "\t";
+    private final String newline = "\n";
+    
+    public HexFormatter() {}
+    
+    /* (non-Javadoc)
+     * @see java.util.Iterator#hasNext()
+     */
+    @Override
+    public boolean hasNext() {
+      return this.iter.hasNext();
+    }
+
+    /* (non-Javadoc)
+     * @see java.util.Iterator#next()
+     */
+    @Override
+    public String next() {
+      Entry<Key, Value> entry = iter.next();
+      
+      String key;
+      
+      // Observe the timestamps
+      if (printTs) {
+        key = entry.getKey().toString();
+      } else {
+        key = entry.getKey().toStringNoTime();
+      }
+      
+      Value v = entry.getValue();
+      
+      // Approximate how much space we'll need
+      StringBuilder sb = new StringBuilder(key.length() + v.getSize() * 5); 
+      
+      sb.append(key).append(tab);
+      
+      for (byte b : v.get()) {
+        if ((b >= 48 && b <= 57) || (b >= 97 || b <= 102)) {
+          sb.append(String.format("0x%x ", new Integer(b)));
+        }
+      }
+      
+      sb.append(newline);
+      
+      return sb.toString();
+    }
+
+    /* (non-Javadoc)
+     * @see java.util.Iterator#remove()
+     */
+    @Override
+    public void remove() {
+      return;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.accumulo.core.util.format.Formatter#initialize(java.lang.Iterable,
boolean)
+     */
+    @Override
+    public void initialize(Iterable<Entry<Key,Value>> scanner, boolean printTimestamps)
{
+      this.iter = scanner.iterator();
+      this.printTs = printTimestamps;
+    }
+    
+  }
+  
+}

Propchange: incubator/accumulo/trunk/src/server/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb  9 21:12:12 2012
@@ -1,3 +1,3 @@
 /incubator/accumulo/branches/1.3.5rc/src/server:1209938
 /incubator/accumulo/branches/1.3/src/server:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124,1209526,1209532,1209539,1209541,1209587,1209657,1210518,1210571,1210596,1210598,1213424,1214320,1225006,1227215,1227231,1227611
-/incubator/accumulo/branches/1.4/src/server:1201902-1242502
+/incubator/accumulo/branches/1.4/src/server:1201902-1242521



Mime
View raw message