<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;Dk8GRHY8fyp7ImA9WhBaFE0.&quot;"><id>tag:blogger.com,1999:blog-3207985</id><updated>2013-05-24T10:13:45.877-04:00</updated><category term="ruby" /><category term="solr" /><category term="zookeeper" /><category term="jdbc" /><category term="javascript" /><category term="jboss seam" /><category term="ActiveRecord" /><category term="junit" /><category term="module_eval" /><category term="fedora" /><category term="accumulo" /><category term="parsing" /><category term="validator" /><category term="cfmx" /><category term="gnome" /><category term="Amazon EC2" /><category term="agile" /><category term="ubuntu dv9000 sound" /><category term="gem" /><category term="servlet" /><category term="judoscript" /><category term="scp" /><category term="eclipse" /><category term="ruby rails gem" /><category term="ruby rspec rails" /><category term="linux" /><category term="plsql" /><category term="xml" /><category term="ant" /><category term="java" /><category term="metaprograming" /><category term="stored procedure" /><category term="lucene" /><category term="linode" /><category term="jboss portal" /><category term="networking" /><category term="oracle" /><category term="gutenberg" /><category term="distributed proofreading" /><category term="terminal" /><category term="dynamic languages" /><category term="open cursors" /><category term="entity attribute value" /><category term="sql" /><category term="wireless" /><category term="timing study" /><category term="twitter" /><category term="locallucene" /><category term="localsolr" /><category term="ubuntu" /><category term="capistrano" /><category term="metadata" /><title>CodeBits - Tested Complex Code!</title><subtitle type="html">&lt;a href="http://www.codebits.com"&gt;Home&lt;/a&gt; - 
&lt;a href="http://www.linkedin.com/in/affyadvice"&gt;LinkedIn Profile&lt;/a&gt; - 
&lt;a href="mailto:david.medinets@gmail.com"&gt;Email&lt;/a&gt;</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://affy.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://affy.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>David Medinets</name><uri>https://plus.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAeo/mRW2HsX9Ajo/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>257</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/Codebits-TestedComplexCode" /><feedburner:info uri="codebits-testedcomplexcode" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;Dk8GRHYyeip7ImA9WhBaFE0.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-4029345813644326074</id><published>2013-05-24T10:13:00.000-04:00</published><updated>2013-05-24T10:13:45.892-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-05-24T10:13:45.892-04:00</app:edited><title>If you use AccumuloRowInputFormat but your job is hung and no scans are running .... you might have forgotten to use values.next().</title><content type="html">&lt;sigh&gt; Infinite loops. Haven't seen one in two years.&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/3ZosE7N9XrY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/4029345813644326074/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=4029345813644326074" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/4029345813644326074?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/4029345813644326074?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/3ZosE7N9XrY/if-you-use-accumulorowinputformat-but.html" title="If you use AccumuloRowInputFormat but your job is hung and no scans are running .... you might have forgotten to use values.next()." /><author><name>David Medinets</name><uri>https://plus.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAeo/mRW2HsX9Ajo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://affy.blogspot.com/2013/05/if-you-use-accumulorowinputformat-but.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8CQ3w4fSp7ImA9WhBaE00.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-2124650101054108974</id><published>2013-05-23T07:17:00.002-04:00</published><updated>2013-05-23T07:17:42.235-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-05-23T07:17:42.235-04:00</app:edited><title>Pointer to "Jump Point Search Explained" Page</title><content type="html">http://zerowidth.com/2013/05/05/jump-point-search-explained.html - This explanation is very well done.&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/347IZGugEVg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/2124650101054108974/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=2124650101054108974" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/2124650101054108974?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/2124650101054108974?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/347IZGugEVg/pointer-to-jump-point-search-explained.html" title="Pointer to &quot;Jump Point Search Explained&quot; Page" /><author><name>David Medinets</name><uri>https://plus.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAeo/mRW2HsX9Ajo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://affy.blogspot.com/2013/05/pointer-to-jump-point-search-explained.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8NR346eip7ImA9WhBbFU4.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-6955380991243168349</id><published>2013-05-14T09:24:00.000-04:00</published><updated>2013-05-14T09:24:56.012-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-05-14T09:24:56.012-04:00</app:edited><title>Understanding Markov Networks</title><content type="html">http://izbicki.me/blog/markov-networks-monoids-and-futurama - I just found a very readable introduction to Markov networks. Don't be scared by the Haskell code, the concepts are all well-explained.&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/VVoeIOn8uGA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/6955380991243168349/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=6955380991243168349" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/6955380991243168349?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/6955380991243168349?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/VVoeIOn8uGA/understanding-markov-networks.html" title="Understanding Markov Networks" /><author><name>David Medinets</name><uri>https://plus.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAeo/mRW2HsX9Ajo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://affy.blogspot.com/2013/05/understanding-markov-networks.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUEBRn4yeCp7ImA9WhBbE0o.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-1603644821769935108</id><published>2013-05-12T11:46:00.000-04:00</published><updated>2013-05-12T11:47:37.090-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-05-12T11:47:37.090-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="accumulo" /><title>Adding a tee command to Accumulo Shell</title><content type="html">An afternoon project. There are hacks involved. Do not use in production!&lt;br /&gt;
&lt;br /&gt;
Some of the iterators that I've been writing are designed to create a problem-oriented dataset; a limited view into the larger dataset.  Once the iterators are put into place in the shell, there isn't a way to easily materialize that sub-set of the data. I'm not even sure it makes sense to materialize it, but it was interesting to experiment with the code.&lt;br /&gt;
&lt;br /&gt;
Because this project was so specific to my whim, I don't feel it's right to add to the official code base.&lt;br /&gt;
&lt;br /&gt;
My first step was an update to the Shell.java file. I added "new TeeCommand()" to the external[] Command array. Then I added a private String attribute called 'teeTableName".  The last change was to the printRecords method. This change was a hack.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;Formatter formatter = FormatterFactory.getFormatter(formatterClass, scanner, printTimestamps);
if (formatter instanceof TeeFormatter) {
    ((TeeFormatter)formatter).setConnector(connector);
    ((TeeFormatter)formatter).setTeeTableName(teeTableName);
}
&lt;/pre&gt;&lt;br /&gt;
The TeeCommand class is fairly simple. The only interesting part of the execute() method. You'll note that the teeTable can't be the same as the current table in the shell. And it is automatically created if it does not exist. Another point to note is that the formatter for the current table is changed *globally*. Another hack. And a dangerous one. I don't see a cleaner way to assign the formatter with larger changes to the Shell class.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;@Override
    public int execute(String fullCommand, CommandLine cl, Shell shellState) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, TableExistsException {
        String tableName = cl.getArgs()[0];
        String currentTableName = shellState.getTableName();
        if (currentTableName.equals(tableName)) {
            throw new RuntimeException("You can't tee to the current table.");
        }
        if (!shellState.getConnector().tableOperations().exists(tableName)) {
            shellState.getConnector().tableOperations().create(tableName);
        }

        String subcommand = cl.getArgs()[1];
        if ("on".equals(subcommand)) {
            shellState.setTeeTableName(tableName);
            shellState.getConnector().tableOperations().setProperty(shellState.getTableName(), Property.TABLE_FORMATTER_CLASS.toString(), TeeFormatter.class.getName());

        } else if ("off".equals(subcommand)) {
            shellState.setTeeTableName(null);
            shellState.getConnector().tableOperations().removeProperty(shellState.getTableName(), Property.TABLE_FORMATTER_CLASS.toString());
        }
       
        return 0;
    }
&lt;/pre&gt;&lt;br /&gt;
The last change was to develop the TeeFormatter class. It's a copy of the DefaultFormatter except for the addition of a copyEntry method which inefficient in the extreme because it opens a BatchWriter for *every* row in the scan. I'll leave it to the reader to develop a more efficient approach. Note that I choose random number for the createBatchWriter call. More hackery!&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;private void copyEntry(Entry&lt;Key,Value&gt; entry) {
      BatchWriter wr = null;
      try {
          wr = connector.createBatchWriter(teeTableName, 10000000, 10000, 5);
          Key key = entry.getKey();
          Value value = entry.getValue();
          Mutation m = new Mutation(key.getRow());
          m.put(key.getColumnFamily(), key.getColumnQualifier(), new ColumnVisibility(key.getColumnVisibility().toString()), key.getTimestamp(), value);
          wr.addMutation(m);
      } catch (TableNotFoundException e) {
          throw new RuntimeException("Unable to find table " + teeTableName, e);
      } catch (MutationsRejectedException e) {
          throw new RuntimeException("Mutation rejected while copying entry to tee table.", e);
      } finally {
          if (wr != null) {
              try {
                  wr.close();
              } catch (MutationsRejectedException e) {
          throw new RuntimeException("Mutation rejected while closng writer to tee table.", e);
              }
          }
      }
  }
&lt;/pre&gt;&lt;br /&gt;
I did not include the whole solution in this email because of length, hackery, and criminal inefficiency. However, if you want this tee command the clues above should let you write your own.&lt;br /&gt;
&lt;br /&gt;
In order to help Accumulo hacking, I've updated my https://github.com/medined/accumulo-at-home project to include a 1.4.3/update-accumulo-1.4.3.sh script.&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/lvSxytJ-LmI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/1603644821769935108/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=1603644821769935108" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/1603644821769935108?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/1603644821769935108?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/lvSxytJ-LmI/adding-tee-command-to-accumulo-shell.html" title="Adding a tee command to Accumulo Shell" /><author><name>David Medinets</name><uri>https://plus.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAeo/mRW2HsX9Ajo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://affy.blogspot.com/2013/05/adding-tee-command-to-accumulo-shell.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkQAQH05eSp7ImA9WhBWEE8.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-4166296211699738215</id><published>2013-04-03T18:32:00.001-04:00</published><updated>2013-04-03T18:32:21.321-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-04-03T18:32:21.321-04:00</app:edited><title>OS/X - tap touchpad with two fingers for a right click.</title><content type="html">My life is suddenly a lot easier... What else don't I know about using OS/X?&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/rZlU8OqH-jE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/4166296211699738215/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=4166296211699738215" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/4166296211699738215?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/4166296211699738215?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/rZlU8OqH-jE/osx-tap-touchpad-with-two-fingers-for.html" title="OS/X - tap touchpad with two fingers for a right click." /><author><name>David Medinets</name><uri>https://plus.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAeo/mRW2HsX9Ajo/s512-c/photo.jpg" /></author><thr:total>1</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://affy.blogspot.com/2013/04/osx-tap-touchpad-with-two-fingers-for.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkcMQHg_fip7ImA9WhBXF0o.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-2511486703335297243</id><published>2013-03-31T14:35:00.001-04:00</published><updated>2013-03-31T18:48:01.646-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-31T18:48:01.646-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="accumulo" /><title>Example using Accumulo's RegExFilter class</title><content type="html">&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;package com.affy;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.SortedMap;
import java.util.TreeMap;
import org.apache.accumulo.core.client.IteratorSetting;
import org.apache.accumulo.core.conf.AccumuloConfiguration;
import org.apache.accumulo.core.data.ByteSequence;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Range;
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.iterators.IteratorEnvironment;
import org.apache.accumulo.core.iterators.IteratorUtil;
import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
import org.apache.accumulo.core.iterators.SortedMapIterator;
import org.apache.accumulo.core.iterators.system.MapFileIterator;
import org.apache.accumulo.core.iterators.user.RegExFilter;
import org.apache.accumulo.core.util.CachedConfiguration;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.log4j.Logger;

public class AccumuloRegExIteratorPlayground {

    private final Logger log = Logger.getLogger(AccumuloRegExIteratorPlayground.class);
    private static final Collection&amp;lt;ByteSequence&amp;gt; EMPTY_COL_FAMS = new ArrayList&amp;lt;ByteSequence&amp;gt;();

    public void process() throws IOException {
        final String regularExpression = "/.*";

        final SortedMap&amp;lt;Key, Value&amp;gt; input = new TreeMap&amp;lt;Key, Value&amp;gt;();
        input.put(new Key("1111", "2222", "3333", 0), new Value("4444".getBytes()));
        input.put(new Key("/1111", "2222", "3333", 0), new Value("4444".getBytes()));

        final RegExFilter rei = new RegExFilter();
        IteratorSetting is = new IteratorSetting(1, RegExFilter.class);
        RegExFilter.setRegexs(is, regularExpression, null, null, null, false);

        if (!rei.validateOptions(is.getOptions())) {
            throw new RuntimeException("invalid options.");
        }

        rei.init(new SortedMapIterator(input), is.getOptions(), new IteratorEnvironment() {
            @Override
            public SortedKeyValueIterator&amp;lt;Key, Value&amp;gt; reserveMapFileReader(String mapFileName) throws IOException {
                Configuration conf = CachedConfiguration.getInstance();
                FileSystem fs = FileSystem.get(conf);
                return new MapFileIterator(AccumuloConfiguration.getDefaultConfiguration(), fs, mapFileName, conf);
            }

            @Override
            public AccumuloConfiguration getConfig() {
                return AccumuloConfiguration.getDefaultConfiguration();
            }

            @Override
            public IteratorUtil.IteratorScope getIteratorScope() {
                throw new UnsupportedOperationException("Not supported yet.");
            }

            @Override
            public boolean isFullMajorCompaction() {
                throw new UnsupportedOperationException("Not supported yet.");
            }

            @Override
            public void registerSideChannel(SortedKeyValueIterator&amp;lt;Key, Value&amp;gt; iter) {
                throw new UnsupportedOperationException("Not supported yet.");
            }
        });
        rei.seek(new Range(), EMPTY_COL_FAMS, false);

        while (rei.hasTop()) {
            final Key key = rei.getTopKey();
            final Value value = rei.getTopValue();
            log.info(key + " --&amp;gt; " + value);
            rei.next();
        }
    }

    public static void main(final String[] args) throws IOException {
        AccumuloRegExIteratorPlayground driver = new AccumuloRegExIteratorPlayground();
        driver.process();
    }
}
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/9e8aoj0v1F4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/2511486703335297243/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=2511486703335297243" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/2511486703335297243?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/2511486703335297243?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/9e8aoj0v1F4/exampe-using-accumulos-regexfilter-class.html" title="Example using Accumulo's RegExFilter class" /><author><name>David Medinets</name><uri>https://plus.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAeo/mRW2HsX9Ajo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://affy.blogspot.com/2013/03/exampe-using-accumulos-regexfilter-class.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkUMQH4zfyp7ImA9WhBXFkU.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-7249087542945069590</id><published>2013-03-30T18:58:00.000-04:00</published><updated>2013-03-30T18:58:01.087-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-30T18:58:01.087-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="accumulo" /><title>Testing Your GrepIterator Without Running Accumulo</title><content type="html">An example program...&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;package com.affy;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Map;
import java.util.SortedMap;
import java.util.TreeMap;
import org.apache.accumulo.core.client.IteratorSetting;
import org.apache.accumulo.core.client.impl.MasterClient;
import org.apache.accumulo.core.data.ByteSequence;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Range;
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.iterators.SortedMapIterator;
import org.apache.accumulo.core.iterators.user.GrepIterator;
import org.apache.log4j.Logger;

public class AccumuloGrepIteratorPlayground {

    private static final Logger log = Logger.getLogger(AccumuloGrepIteratorPlayground.class);
    private static final Collection&lt;ByteSequence&gt; EMPTY_COL_FAMS = new ArrayList&lt;ByteSequence&gt;();

    public static void main(final String[] args) throws IOException {
        final String term = "/1";

        final SortedMap&amp;lt;Key, Value&amp;gt; input = new TreeMap&amp;lt;Key, Value&amp;gt;();
        input.put(new Key("1111", "2222", "3333", 0), new Value("4444".getBytes()));
        input.put(new Key("/1111", "2222", "3333", 0), new Value("4444".getBytes()));

        final GrepIterator grepIterator = new GrepIterator();
        final IteratorSetting iteratorSetting = new IteratorSetting(1, GrepIterator.class);
        GrepIterator.setTerm(iteratorSetting, term);
        grepIterator.init(new SortedMapIterator(input), iteratorSetting.getOptions(), null);
        grepIterator.seek(new Range(), EMPTY_COL_FAMS, false);

        while (grepIterator.hasTop()) {
            final Key key = grepIterator.getTopKey();
            final Value value = grepIterator.getTopValue();
            log.info(key + " --&amp;gt; " + value);
            grepIterator.next();
        }

    }
}
&lt;/pre&gt;&lt;br /&gt;
The pom.xml looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&amp;lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&amp;gt;
    &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;

    &amp;lt;groupId&amp;gt;com.mycompany&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;AccumuloGrepIterator&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;1.0-SNAPSHOT&amp;lt;/version&amp;gt;
    &amp;lt;packaging&amp;gt;jar&amp;lt;/packaging&amp;gt;

    &amp;lt;name&amp;gt;AccumuloGrepIterator&amp;lt;/name&amp;gt;
    &amp;lt;url&amp;gt;http://maven.apache.org&amp;lt;/url&amp;gt;

    &amp;lt;properties&amp;gt;
        &amp;lt;project.build.sourceEncoding&amp;gt;UTF-8&amp;lt;/project.build.sourceEncoding&amp;gt;
    &amp;lt;/properties&amp;gt;

    &amp;lt;dependencies&amp;gt;
        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.apache.accumulo&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;accumulo-core&amp;lt;/artifactId&amp;gt;
            &amp;lt;version&amp;gt;1.4.2&amp;lt;/version&amp;gt;
        &amp;lt;/dependency&amp;gt;
        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.apache.hadoop&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;hadoop-common&amp;lt;/artifactId&amp;gt;
            &amp;lt;version&amp;gt;0.23.6&amp;lt;/version&amp;gt;
        &amp;lt;/dependency&amp;gt;        
        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;junit&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;junit&amp;lt;/artifactId&amp;gt;
            &amp;lt;version&amp;gt;3.8.1&amp;lt;/version&amp;gt;
            &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
        &amp;lt;/dependency&amp;gt;
    &amp;lt;/dependencies&amp;gt;
&amp;lt;/project&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/BAuVa6lsnT4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/7249087542945069590/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=7249087542945069590" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/7249087542945069590?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/7249087542945069590?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/BAuVa6lsnT4/testing-your-grepiterator-without.html" title="Testing Your GrepIterator Without Running Accumulo" /><author><name>David Medinets</name><uri>https://plus.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAeo/mRW2HsX9Ajo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://affy.blogspot.com/2013/03/testing-your-grepiterator-without.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkQHRXs9eip7ImA9WhBXFkU.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-6261271154897860552</id><published>2013-03-27T19:22:00.000-04:00</published><updated>2013-03-30T18:58:54.562-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-30T18:58:54.562-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="accumulo" /><title>Running Accumulo Unit Tests On Windows</title><content type="html">Accumulo is not designed to run under Windows. Nor are its unit tests. However, if you persist in this foolishness, add the following elements to the indicated pom.xml files.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;core/pom.xml

    &amp;lt;profile&amp;gt;
        &amp;lt;id&amp;gt;skipped_tests_on_windows&amp;lt;/id&amp;gt;
        &amp;lt;activation&amp;gt;
            &amp;lt;activeByDefault&amp;gt;false&amp;lt;/activeByDefault&amp;gt;
            &amp;lt;os&amp;gt;
                &amp;lt;family&amp;gt;Windows&amp;lt;/family&amp;gt;
            &amp;lt;/os&amp;gt;
            &amp;lt;/activation&amp;gt;
        &amp;lt;build&amp;gt;
        &amp;lt;plugins&amp;gt;
            &amp;lt;plugin&amp;gt;
            &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;maven-surefire-plugin&amp;lt;/artifactId&amp;gt;
                &amp;lt;configuration&amp;gt;
                    &amp;lt;excludes&amp;gt;
                        &amp;lt;exclude&amp;gt;**/AccumuloFileOutputFormatTest.java&amp;lt;/exclude&amp;gt;
                        &amp;lt;exclude&amp;gt;**/AccumuloFileInputFormatTest.java&amp;lt;/exclude&amp;gt;
                        &amp;lt;exclude&amp;gt;**/AccumuloOutputFormatTest.java&amp;lt;/exclude&amp;gt;
                        &amp;lt;exclude&amp;gt;**/AccumuloRowInputFormatTest.java&amp;lt;/exclude&amp;gt;
                        &amp;lt;exclude&amp;gt;**/AccumuloInputFormatTest.java&amp;lt;/exclude&amp;gt;
                        &amp;lt;exclude&amp;gt;**/MockTableOperationsTest.java&amp;lt;/exclude&amp;gt;
                        &amp;lt;exclude&amp;gt;**/AggregatingIteratorTest.java&amp;lt;/exclude&amp;gt;
                        &amp;lt;exclude&amp;gt;**/IterUtilTest.java&amp;lt;/exclude&amp;gt;
                        &amp;lt;exclude&amp;gt;**/CombinerTest.java&amp;lt;/exclude&amp;gt;
                        &amp;lt;exclude&amp;gt;**/FormatterCommandTest.java&amp;lt;/exclude&amp;gt;
                        &amp;lt;/excludes&amp;gt;
                    &amp;lt;/configuration&amp;gt;
                &amp;lt;/plugin&amp;gt;
            &amp;lt;/plugins&amp;gt;
        &amp;lt;/build&amp;gt;
    &amp;lt;/profile&amp;gt;

examples/simple/pom.xml

    &amp;lt;profile&amp;gt;
        &amp;lt;id&amp;gt;skipped_tests_on_windows&amp;lt;/id&amp;gt;
        &amp;lt;activation&amp;gt;
            &amp;lt;activeByDefault&amp;gt;false&amp;lt;/activeByDefault&amp;gt;
            &amp;lt;os&amp;gt;
                &amp;lt;family&amp;gt;Windows&amp;lt;/family&amp;gt;
            &amp;lt;/os&amp;gt;
            &amp;lt;/activation&amp;gt;
        &amp;lt;build&amp;gt;
            &amp;lt;plugins&amp;gt;
                &amp;lt;plugin&amp;gt;
                    &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;
                    &amp;lt;artifactId&amp;gt;maven-surefire-plugin&amp;lt;/artifactId&amp;gt;
                    &amp;lt;configuration&amp;gt;
                        &amp;lt;excludes&amp;gt;
                            &amp;lt;exclude&amp;gt;**/ChunkInputFormatTest.java&amp;lt;/exclude&amp;gt;
                            &amp;lt;/excludes&amp;gt;
                    &amp;lt;/configuration&amp;gt;
                &amp;lt;/plugin&amp;gt;
            &amp;lt;/plugins&amp;gt;
        &amp;lt;/build&amp;gt;
    &amp;lt;/profile&amp;gt;

proxy/pom.xml

    &amp;lt;profile&amp;gt;
        &amp;lt;id&amp;gt;skipped_tests_on_windows&amp;lt;/id&amp;gt;
        &amp;lt;activation&amp;gt;
            &amp;lt;activeByDefault&amp;gt;false&amp;lt;/activeByDefault&amp;gt;
            &amp;lt;os&amp;gt;
                &amp;lt;family&amp;gt;Windows&amp;lt;/family&amp;gt;
            &amp;lt;/os&amp;gt;
            &amp;lt;/activation&amp;gt;
        &amp;lt;build&amp;gt;
            &amp;lt;plugins&amp;gt;
                &amp;lt;plugin&amp;gt;
                    &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;
                    &amp;lt;artifactId&amp;gt;maven-surefire-plugin&amp;lt;/artifactId&amp;gt;
                    &amp;lt;configuration&amp;gt;
                        &amp;lt;excludes&amp;gt;
                            &amp;lt;exclude&amp;gt;**/SimpleTest.java&amp;lt;/exclude&amp;gt;
                            &amp;lt;exclude&amp;gt;**/TestProxyInstanceOperations.java&amp;lt;/exclude&amp;gt;
                        &amp;lt;/excludes&amp;gt;
                    &amp;lt;/configuration&amp;gt;
                &amp;lt;/plugin&amp;gt;
            &amp;lt;/plugins&amp;gt;
        &amp;lt;/build&amp;gt;
    &amp;lt;/profile&amp;gt;
  &amp;lt;/profiles&amp;gt;

server/pom.xml

    &amp;lt;profile&amp;gt;
        &amp;lt;id&amp;gt;skipped_tests_on_windows&amp;lt;/id&amp;gt;
        &amp;lt;activation&amp;gt;
            &amp;lt;activeByDefault&amp;gt;false&amp;lt;/activeByDefault&amp;gt;
            &amp;lt;os&amp;gt;
                &amp;lt;family&amp;gt;Windows&amp;lt;/family&amp;gt;
            &amp;lt;/os&amp;gt;
            &amp;lt;/activation&amp;gt;
        &amp;lt;build&amp;gt;
            &amp;lt;plugins&amp;gt;
                &amp;lt;plugin&amp;gt;
                    &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;
                    &amp;lt;artifactId&amp;gt;maven-surefire-plugin&amp;lt;/artifactId&amp;gt;
                    &amp;lt;configuration&amp;gt;
                        &amp;lt;excludes&amp;gt;
                            &amp;lt;exclude&amp;gt;**/TableLoadBalancerTest.java&amp;lt;/exclude&amp;gt;
                            &amp;lt;/excludes&amp;gt;
                    &amp;lt;/configuration&amp;gt;
                &amp;lt;/plugin&amp;gt;
            &amp;lt;/plugins&amp;gt;
        &amp;lt;/build&amp;gt;
    &amp;lt;/profile&amp;gt;

start/pom.xml

    &amp;lt;profile&amp;gt;
        &amp;lt;id&amp;gt;skipped_tests_on_windows&amp;lt;/id&amp;gt;
        &amp;lt;activation&amp;gt;
            &amp;lt;activeByDefault&amp;gt;false&amp;lt;/activeByDefault&amp;gt;
            &amp;lt;os&amp;gt;
                &amp;lt;family&amp;gt;Windows&amp;lt;/family&amp;gt;
            &amp;lt;/os&amp;gt;
            &amp;lt;/activation&amp;gt;
        &amp;lt;build&amp;gt;
        &amp;lt;plugins&amp;gt;
            &amp;lt;plugin&amp;gt;
            &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;maven-surefire-plugin&amp;lt;/artifactId&amp;gt;
                &amp;lt;configuration&amp;gt;
                    &amp;lt;excludes&amp;gt;
                        &amp;lt;exclude&amp;gt;**/AccumuloVFSClassLoaderTest.java&amp;lt;/exclude&amp;gt;
                        &amp;lt;exclude&amp;gt;**/ReadOnlyHdfsFileProviderTest.java&amp;lt;/exclude&amp;gt;
                        &amp;lt;exclude&amp;gt;**/VfsClassLoaderTest.java&amp;lt;/exclude&amp;gt;
                        &amp;lt;/excludes&amp;gt;
                    &amp;lt;/configuration&amp;gt;
                &amp;lt;/plugin&amp;gt;
            &amp;lt;/plugins&amp;gt;
        &amp;lt;/build&amp;gt;
    &amp;lt;/profile&amp;gt;

test/pom.xml

    &amp;lt;profile&amp;gt;
        &amp;lt;id&amp;gt;skipped_tests_on_windows&amp;lt;/id&amp;gt;
        &amp;lt;activation&amp;gt;
            &amp;lt;activeByDefault&amp;gt;false&amp;lt;/activeByDefault&amp;gt;
            &amp;lt;os&amp;gt;
                &amp;lt;family&amp;gt;Windows&amp;lt;/family&amp;gt;
            &amp;lt;/os&amp;gt;
            &amp;lt;/activation&amp;gt;
        &amp;lt;build&amp;gt;
            &amp;lt;plugins&amp;gt;
                &amp;lt;plugin&amp;gt;
                    &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;
                    &amp;lt;artifactId&amp;gt;maven-surefire-plugin&amp;lt;/artifactId&amp;gt;
                    &amp;lt;configuration&amp;gt;
                        &amp;lt;excludes&amp;gt;
                            &amp;lt;exclude&amp;gt;**/MiniAccumuloClusterTest.java&amp;lt;/exclude&amp;gt;
                            &amp;lt;exclude&amp;gt;**/ShellServerTest.java&amp;lt;/exclude&amp;gt;
                        &amp;lt;/excludes&amp;gt;
                    &amp;lt;/configuration&amp;gt;
                &amp;lt;/plugin&amp;gt;
            &amp;lt;/plugins&amp;gt;
        &amp;lt;/build&amp;gt;
    &amp;lt;/profile&amp;gt;
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/e_ULg35ELqU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/6261271154897860552/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=6261271154897860552" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/6261271154897860552?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/6261271154897860552?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/e_ULg35ELqU/running-accumulo-unit-tests-on-windows.html" title="Running Accumulo Unit Tests On Windows" /><author><name>David Medinets</name><uri>https://plus.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAeo/mRW2HsX9Ajo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://affy.blogspot.com/2013/03/running-accumulo-unit-tests-on-windows.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk4AQn86cSp7ImA9WhNVGEw.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-4092588369150143511</id><published>2012-12-29T16:01:00.001-05:00</published><updated>2012-12-29T16:02:23.119-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-12-29T16:02:23.119-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="accumulo" /><title>How To Stop Accumulo Debug Messages From Being Logged</title><content type="html">Comment out references to A2 in conf/generic_logger.xml and conf/monitor_logger.xml. Then stop all Accumulo processes. Delete logs/*. Restart Accumulo. Done.&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/odL3FWsyUcg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/4092588369150143511/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=4092588369150143511" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/4092588369150143511?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/4092588369150143511?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/odL3FWsyUcg/how-to-stop-accumulo-debug-messages.html" title="How To Stop Accumulo Debug Messages From Being Logged" /><author><name>David Medinets</name><uri>https://plus.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAeo/mRW2HsX9Ajo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://affy.blogspot.com/2012/12/how-to-stop-accumulo-debug-messages.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUcDRHw9fyp7ImA9WhNWGEQ.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-593211400498068976</id><published>2012-12-18T23:57:00.001-05:00</published><updated>2012-12-18T23:57:55.267-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-12-18T23:57:55.267-05:00</app:edited><title>SOLVED: add-apt-repository command not found.</title><content type="html">Run the following to install the package with the add-apt-repository command.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;apt-get -y install software-properties-common
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/T_CINIINUMo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/593211400498068976/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=593211400498068976" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/593211400498068976?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/593211400498068976?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/T_CINIINUMo/solved-add-apt-repository-command-not.html" title="SOLVED: add-apt-repository command not found." /><author><name>David Medinets</name><uri>https://plus.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAeo/mRW2HsX9Ajo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://affy.blogspot.com/2012/12/solved-add-apt-repository-command-not.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUAFRno8fyp7ImA9WhNRF0U.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-1564734978669452649</id><published>2012-11-13T00:15:00.000-05:00</published><updated>2012-11-13T00:15:17.477-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-11-13T00:15:17.477-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="accumulo" /><title>Exampe of Storing User and Friends Information in Accumulo</title><content type="html">&lt;p&gt;This example shows one way to store user and friend information in one Accumulo table. Each friend category becomes a Column Family and each friend's user id becomes a Column Qualifier. After the inserts a small query is run to loop over old friends.&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;pre&gt;package com.codebits.accumulo;

import java.io.IOException;
import java.util.Iterator;
import java.util.Map;

import org.apache.accumulo.core.client.AccumuloException;
import org.apache.accumulo.core.client.AccumuloSecurityException;
import org.apache.accumulo.core.client.BatchWriter;
import org.apache.accumulo.core.client.Connector;
import org.apache.accumulo.core.client.Instance;
import org.apache.accumulo.core.client.Scanner;
import org.apache.accumulo.core.client.TableExistsException;
import org.apache.accumulo.core.client.TableNotFoundException;
import org.apache.accumulo.core.client.mock.MockInstance;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Mutation;
import org.apache.accumulo.core.data.Range;
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.security.Authorizations;
import org.apache.hadoop.io.Text;

public class UserAndFriendsDriver {

  public static void main(String[] args) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, TableNotFoundException {
    Instance mock = new MockInstance("development");
    Connector connector = mock.getConnector("root", "password".getBytes());
    connector.tableOperations().create("TABLEA");

    BatchWriter wr = connector.createBatchWriter("TABLEA", 10000000, 10000, 5);
    Mutation m = new Mutation(new Text("john"));
    m.put("info:name", "", "john henry");
    m.put("info:gender", "", "male");
    m.put("friend:old", "mark", "");
    wr.addMutation(m);
    m = new Mutation(new Text("mary"));
    m.put("info:name", "", "mark wiggins");
    m.put("info:gender", "", "female");
    m.put("friend:new", "mark", "");
    m.put("friend:old", "lucas", "");
    m.put("friend:old", "aaron", "");
    wr.addMutation(m);
    wr.close();

    Scanner scanner = connector.createScanner("TABLEA", new Authorizations());
    scanner.setRange(new Range("a", "z"));
    scanner.fetchColumnFamily(new Text("friend:old"));
    Iterator&amp;lt;Map.Entry&amp;lt;Key, Value&amp;gt;&amp;gt; iterator = scanner.iterator();
    while (iterator.hasNext()) {
      Map.Entry&amp;lt;Key, Value&amp;gt; entry = iterator.next();
      Key key = entry.getKey();
      System.out.println("Old Friends: " + key.getRow() + " -&amp;gt; " + key.getColumnQualifier());
    }
  }
}
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/eK8eKy1H87s" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/1564734978669452649/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=1564734978669452649" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/1564734978669452649?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/1564734978669452649?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/eK8eKy1H87s/exampe-of-storing-user-and-friends.html" title="Exampe of Storing User and Friends Information in Accumulo" /><author><name>David Medinets</name><uri>https://plus.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAeo/mRW2HsX9Ajo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://affy.blogspot.com/2012/11/exampe-of-storing-user-and-friends.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8MSXcyeCp7ImA9WhNRF0g.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-7188943587597231817</id><published>2012-11-12T17:04:00.001-05:00</published><updated>2012-11-12T17:04:48.990-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-11-12T17:04:48.990-05:00</app:edited><title>How Can I Use Reverse Sort On Integer (or Long) Accumulo Keys?</title><content type="html">This entry will be very similar to my last. Here is code with debugging (i.e., the original key is retained) so that you can see the reverse sort is working.&lt;br /&gt;
&lt;pre&gt;package com.codebits.accumulo;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.Iterator;
import java.util.Map;

import org.apache.accumulo.core.client.AccumuloException;
import org.apache.accumulo.core.client.AccumuloSecurityException;
import org.apache.accumulo.core.client.BatchWriter;
import org.apache.accumulo.core.client.Connector;
import org.apache.accumulo.core.client.Instance;
import org.apache.accumulo.core.client.Scanner;
import org.apache.accumulo.core.client.TableExistsException;
import org.apache.accumulo.core.client.TableNotFoundException;
import org.apache.accumulo.core.client.mock.MockInstance;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Mutation;
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.security.Authorizations;
import org.apache.hadoop.io.Text;

public class ReversingIntSortOrderWithMockInstanceDriver {

  static byte[] convert(int value) {
    byte[] key = ByteBuffer.allocate(4).putInt(value).array();
    byte[] reverse_key = ByteBuffer.allocate(4).putInt(Integer.MAX_VALUE - value).array();
    byte[] rv = new byte[8];
    for (int i = 0; i &amp;lt; 4; i++) {
      rv[i] = reverse_key[i];
    }
    for (int i = 0; i &amp;lt; 4; i++) {
      rv[i + 4] = key[i];
    }
    return rv;
  }

  public static String toHexString(byte[] ba) {
    StringBuilder str = new StringBuilder();
    for (int i = 0; i &amp;lt; ba.length; i++)
      str.append(String.format("%x", ba[i]));
    return str.toString();
  }

  public static void main(String[] args) throws IOException, AccumuloException, AccumuloSecurityException, TableExistsException, TableNotFoundException {
    Instance mock = new MockInstance("development");
    Connector connector = mock.getConnector("root", "password".getBytes());
    connector.tableOperations().create("TABLEA");

    BatchWriter wr = connector.createBatchWriter("TABLEA", 10000000, 10000, 5);
    for (int i = 5; i &amp;gt; 0; --i) {
      byte[] key = convert(i);
      Mutation m = new Mutation(new Text(key));
      m.put("cf", "cq", "value");
      wr.addMutation(m);
    }
    wr.close();

    Scanner scanner = connector.createScanner("TABLEA", new Authorizations());
    Iterator&amp;lt;Map.Entry&amp;lt;Key, Value&amp;gt;&amp;gt; iterator = scanner.iterator();
    while (iterator.hasNext()) {
      Map.Entry&lt;Key, Value&gt; entry = iterator.next();
      Key key = entry.getKey();
      System.out.println(toHexString(key.getRow().getBytes()));
    }
  }
}
&lt;/pre&gt;&lt;p&gt;This code produces this output:&lt;/p&gt;&lt;pre&gt;7ffffffa0005
7ffffffb0004
7ffffffc0003
7ffffffd0002
7ffffffe0001
&lt;/pre&gt;&lt;p&gt;I'll leave it to the reader to remove the debugging code.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/SUOiOFRm2RY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/7188943587597231817/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=7188943587597231817" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/7188943587597231817?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/7188943587597231817?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/SUOiOFRm2RY/how-can-i-use-reverse-sort-on-integer.html" title="How Can I Use Reverse Sort On Integer (or Long) Accumulo Keys?" /><author><name>David Medinets</name><uri>https://plus.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAeo/mRW2HsX9Ajo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://affy.blogspot.com/2012/11/how-can-i-use-reverse-sort-on-integer.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUcHRXs4eSp7ImA9WhNRF0g.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-536813126529061410</id><published>2012-11-12T16:02:00.002-05:00</published><updated>2012-11-12T16:50:34.531-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-11-12T16:50:34.531-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="accumulo" /><title>How Can I Use Reverse Sort On Generic Accumulo Keys?</title><content type="html">&lt;p&gt;This note shows how to reverse the sorting of Accumulo (actually, the row values). As you might know, the standard sort order is lexical. This first example shows a standard usage of a mock Accumulo instance. Notice that records inserted in reverse order (5, 4, 3, 2, 1) but are printed in lexical order.&lt;/p&gt;&lt;pre&gt;public static void main(String[] args) throws Exception {
  // connect to a mock Accumulo instance.
  Instance mock = new MockInstance("development");
  Connector connector = mock.getConnector("root", "password".getBytes());
  connector.tableOperations().create("TABLEA");
  BatchWriter wr = connector.createBatchWriter("TABLEA", 10000000, 10000, 5);

  // insert five records in reverse order.
  for (int i = 5; i &amp;gt; 0; --i) {
    byte[] key = ("row_" + String.format("%04d", i)).getBytes();
    Mutation m = new Mutation(new Text(key));
    m.put("cf_" + String.format("%04d", i), "cq_" + 1, "val_" + 1);
    wr.addMutation(m);
  }
  wr.close();

  // display records; notice they are lexically sorted.
  Scanner scanner = connector.createScanner("TABLEA", new Authorizations());
  Iterator&amp;ltMap.Entry&amp;lyKey, Value&amp;gt&amp;gt iterator = scanner.iterator();
  while (iterator.hasNext()) {
    Map.Entry&lt;Key, Value&gt; entry = iterator.next();
    Key key = entry.getKey();
    System.out.println("ROW ID: " + key.getRow());
  }
 }
&lt;/pre&gt;&lt;p&gt;The above code displays:&lt;/p&gt;&lt;pre&gt;ROW ID: row_0001
ROW ID: row_0002
ROW ID: row_0003
ROW ID: row_0004
ROW ID: row_0005
&lt;/pre&gt;&lt;p&gt;Reverse sorting is accomplished by subtracting each byte in the row id from 255 as shown in the example below.&lt;br /&gt;
&lt;pre&gt;&lt;b&gt;static byte[] convert(byte[] row) {
  byte[] rv = new byte[row.length * 2];
  for (int i = 0; i &lt; row.length; i++) {
    rv[i] = (byte) (255 - row[i]);
  }
  for (int i = 0; i &lt; row.length; i++) {
    rv[i + row.length] = row[i];
  }
  return rv;
 }&lt;/b&gt;

 public static void main(String[] args) throws Exception {
  // connect to a mock Accumulo instance.
  Instance mock = new MockInstance("development");
  Connector connector = mock.getConnector("root", "password".getBytes());
  connector.tableOperations().create("TABLEA");
  BatchWriter wr = connector.createBatchWriter("TABLEA", 10000000, 10000, 5);

  // insert five records in reverse order.
  for (int i = 5; i &amp;gt; 0; --i) {
    byte[] key = ("row_" + String.format("%04d", i)).getBytes();
    &lt;b&gt;byte[] reverse_key = convert(key);&lt;/b&gt;
    Mutation m = new Mutation(new Text(&lt;b&gt;reverse_key&lt;/b&gt;));
    m.put("cf_" + String.format("%04d", i), "cq_" + 1, "val_" + 1);
    wr.addMutation(m);
  }
  wr.close();

  // display records; notice they are lexically sorted.
  Scanner scanner = connector.createScanner("TABLEA", new Authorizations());
  Iterator&amp;ltMap.Entry&amp;lyKey, Value&amp;gt&amp;gt iterator = scanner.iterator();
  while (iterator.hasNext()) {
    Map.Entry&lt;Key, Value&gt; entry = iterator.next();
    Key key = entry.getKey();
    System.out.println("ROW ID: " + key.getRow());
  }
 }
&lt;/pre&gt;&lt;p&gt;The above code displays:&lt;/p&gt;&lt;pre&gt;ROW ID: ��������row_0005
ROW ID: ��������row_0004
ROW ID: ��������row_0003
ROW ID: ��������row_0002
ROW ID: ��������row_0001
&lt;/pre&gt;&lt;p&gt;It's important to note that for teaching purposes, the key is stored once in reverse format and again normally. Thus when displayed you can verify that the key is stored in reverse order. Normally the convert method is used like this:&lt;/p&gt;&lt;pre&gt;static byte[] convert(byte[] row) {
  byte[] rv = new byte[row.length];
  for (int i = 0; i &lt; row.length; i++) {
    rv[i] = (byte) (255 - row[i]);
  }
  return rv;
 }
&lt;/pre&gt;
&lt;p&gt;For some use cases, you can convert the row bytes in place:&lt;/p&gt;&lt;pre&gt;static byte[] convert(byte[] row) {
  for (int i = 0; i &lt; row.length; i++) {
    row[i] = (byte) (255 - row[i]);
  }
  return row;
 }
&lt;/pre&gt;
&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/aoprwvXwF08" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/536813126529061410/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=536813126529061410" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/536813126529061410?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/536813126529061410?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/aoprwvXwF08/how-can-i-use-reverse-sort-on-generic.html" title="How Can I Use Reverse Sort On Generic Accumulo Keys?" /><author><name>David Medinets</name><uri>https://plus.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAeo/mRW2HsX9Ajo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://affy.blogspot.com/2012/11/how-can-i-use-reverse-sort-on-generic.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkAMRnw9fip7ImA9WhNSFk4.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-5354106522752298411</id><published>2012-10-30T16:59:00.001-04:00</published><updated>2012-10-30T16:59:47.266-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-10-30T16:59:47.266-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="accumulo" /><title>Considerations for a Manual Partitioning Strategy in Accumulo</title><content type="html">On the Accumulo Users mailing list, Adam F. suggested:&lt;br /&gt;
&lt;blockquote&gt;1. Parallelism and balance at ingest time. You need to find a happy medium between too few partitions (not enough parallelism) and too many partitions (tablet server resource contention and inefficient indexes). Probably at least one partition per tablet server being actively written to is good, and you'll want to pre-split so they can be distributed evenly. Ten partitions per tablet server is probably not too many -- I wouldn't expect to see contention at that point.&lt;br /&gt;
&lt;br /&gt;
2. Parallelism and balance at query time. At query time, you'll be selecting a subset of all of the partitions that you've ever ingested into. This subset should be bounded similarly to the concern addressed in #1, but the bounds could be looser depending on the types of queries you want to run. Lower latency queries would tend to favor only a few partitions per node.&lt;br /&gt;
&lt;br /&gt;
3. Growth over time in partition size. Over time, you want partitions to be bounded to less than about 10-100GB. This has to do with limiting the maximum amount of time that a major compaction will take, and impacts availability and performance in the extreme cases. At the same time, you want partitions to be as large as possible so that their indexes are more efficient.&lt;br /&gt;
&lt;br /&gt;
One strategy to optimize partition size would be to keep using each partition until it is "full", then make another partition. Another would be to allocate a certain number of partitions per day, and then only put data in those partitions during that day. These strategies are also elastic, and can be tweaked as the cluster grows.&lt;br /&gt;
&lt;br /&gt;
In all of these cases, you will need a good load balancing strategy. The default strategy of evening up the number of partitions per tablet server is probably not sufficient, so you may need to write your own tablet load balancer that is aware of your partitioning strategy.&lt;br /&gt;
&lt;/blockquote&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/HUFSO9dsgyo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/5354106522752298411/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=5354106522752298411" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/5354106522752298411?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/5354106522752298411?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/HUFSO9dsgyo/considerations-for-manual-partitioning.html" title="Considerations for a Manual Partitioning Strategy in Accumulo" /><author><name>David Medinets</name><uri>https://plus.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAeo/mRW2HsX9Ajo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://affy.blogspot.com/2012/10/considerations-for-manual-partitioning.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkENSHg5eyp7ImA9WhNTFEk.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-3844139724800877525</id><published>2012-10-16T23:28:00.002-04:00</published><updated>2012-10-16T23:31:39.623-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-10-16T23:31:39.623-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="accumulo" /><title>How Many Accumuo Loggers Are Needed Related To  Slaves (tserver) Nodes?</title><content type="html">From the Accumulo User mailing list on Oct 10, 2012, John V says:&lt;br /&gt;
&lt;blockquote&gt;The scripts start loggers on all of the slave nodes. You can arbitrarily start/stop loggers, but we highly recommend doing 1:1 between them and tservers because the method for assigning tserver-&gt;logger does make assumptions depending on that 1:1 correlation.&lt;br /&gt;
&lt;/blockquote&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/Up3JywMcbZ0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/3844139724800877525/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=3844139724800877525" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/3844139724800877525?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/3844139724800877525?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/Up3JywMcbZ0/how-many-accumuo-loggers-are-needed.html" title="How Many Accumuo Loggers Are Needed Related To  Slaves (tserver) Nodes?" /><author><name>David Medinets</name><uri>https://plus.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAeo/mRW2HsX9Ajo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://affy.blogspot.com/2012/10/how-many-accumuo-loggers-are-needed.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkENQH84eyp7ImA9WhNTFEk.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-6703047174234357444</id><published>2012-10-16T23:26:00.000-04:00</published><updated>2012-10-16T23:31:31.133-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-10-16T23:31:31.133-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="accumulo" /><title>How Does the Accumulo Client Find the Correct Tablet Server?</title><content type="html">From the Accumulo User mailing list on Oct 10, 2012, John V says:&lt;br /&gt;
&lt;blockquote&gt;Depending on the Instance your using, the client may hit HDFS first to get some instance information. Then either instance will hit Zookeeper to get the root tablet location. It will then scan that to find the appropriate !METADATA tablet, but will aggressively cache everything. The client will then scan (with heavy caching again) the !METADATA tablets necessary to find the tablet(s) for the range of writes. And then the writes will occur to appropriate tablets discovered in the !METADATA scan.&lt;br /&gt;
&lt;/blockquote&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/Uu0rFHhcuMM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/6703047174234357444/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=6703047174234357444" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/6703047174234357444?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/6703047174234357444?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/Uu0rFHhcuMM/how-does-accumulo-client-find-correct.html" title="How Does the Accumulo Client Find the Correct Tablet Server?" /><author><name>David Medinets</name><uri>https://plus.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAeo/mRW2HsX9Ajo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://affy.blogspot.com/2012/10/how-does-accumulo-client-find-correct.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkEDSHkzcSp7ImA9WhNTFEk.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-6947562992297250081</id><published>2012-10-02T18:23:00.000-04:00</published><updated>2012-10-16T23:31:19.789-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-10-16T23:31:19.789-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="accumulo" /><title>How To Run Multiple Instances of Accumulo on One Hadoop Cluster</title><content type="html">On the Accumulo User mailing list, Kristopher K. asked:&lt;br /&gt;
&lt;blockquote&gt;I built 1.5 from source last night and wanted to try it out on my existing Hadoop cluster without overwriting my current 1.4 set.  Is there a way to specify the /accumulo directory in HDFS such that you can run multiple instances?&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
Eric N. replied:&lt;br /&gt;
&lt;blockquote&gt;From the monitoring user interface, see the Documentation link, then Configuration, see the first property:&lt;br /&gt;
&lt;br /&gt;
instance.dfs.dir&lt;br /&gt;
&lt;br /&gt;
You'll also change all the port numbers from the defaults.  And there's a port number in conf/generic_logger.xml that points to the logging port on the monitor.&lt;br /&gt;
&lt;br /&gt;
For example, here are some entries from my conf/accumulo-site.xml file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;property&amp;gt;&lt;br /&gt;
&amp;lt;name&amp;gt;master.port.client&amp;lt;/name&amp;gt;&lt;br /&gt;
&amp;lt;value&amp;gt;10010&amp;lt;/value&amp;gt;&lt;br /&gt;
&amp;lt;/property&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;property&amp;gt;&lt;br /&gt;
&amp;lt;name&amp;gt;tserver.port.client&amp;lt;/name&amp;gt;&lt;br /&gt;
&amp;lt;value&amp;gt;10011&amp;lt;/value&amp;gt;&lt;br /&gt;
&amp;lt;/property&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;property&amp;gt;&lt;br /&gt;
&amp;lt;name&amp;gt;gc.port.client&amp;lt;/name&amp;gt;&lt;br /&gt;
&amp;lt;value&amp;gt;10101&amp;lt;/value&amp;gt;&lt;br /&gt;
&amp;lt;/property&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;property&amp;gt;&lt;br /&gt;
&amp;lt;name&amp;gt;trace.port.client&amp;lt;/name&amp;gt;&lt;br /&gt;
&amp;lt;value&amp;gt;10111&amp;lt;/value&amp;gt;&lt;br /&gt;
&amp;lt;/property&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;property&amp;gt;&lt;br /&gt;
&amp;lt;name&amp;gt;monitor.port.client&amp;lt;/name&amp;gt;&lt;br /&gt;
&amp;lt;value&amp;gt;11111&amp;lt;/value&amp;gt;&lt;br /&gt;
&amp;lt;/property&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;property&amp;gt;&lt;br /&gt;
&amp;lt;name&amp;gt;monitor.port.log4j&amp;lt;/name&amp;gt;&lt;br /&gt;
&amp;lt;value&amp;gt;1560&amp;lt;/value&amp;gt;&lt;br /&gt;
&amp;lt;/property&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And conf generic_logger.xml:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Send all logging data to a centralized logger --&amp;gt;&lt;br /&gt;
&amp;lt;appender name=&amp;quot;N1&amp;quot; class=&amp;quot;org.apache.log4j.net.SocketAppender&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;param name=&amp;quot;remoteHost&amp;quot;     value=&amp;quot;${org.apache.accumulo.core.host.log}&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;param name=&amp;quot;port&amp;quot;           value=&amp;quot;1560&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;param name=&amp;quot;application&amp;quot;    value=&amp;quot;${org.apache.accumulo.core.application}:${org.apache.accumulo.core.ip.localhost.hostname}&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;param name=&amp;quot;Threshold&amp;quot;      value=&amp;quot;WARN&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/appender&amp;gt;&lt;br /&gt;
&lt;/blockquote&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/D_aGbk_X1F0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/6947562992297250081/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=6947562992297250081" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/6947562992297250081?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/6947562992297250081?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/D_aGbk_X1F0/how-to-run-multiple-instances-of.html" title="How To Run Multiple Instances of Accumulo on One Hadoop Cluster" /><author><name>David Medinets</name><uri>https://plus.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAeo/mRW2HsX9Ajo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://affy.blogspot.com/2012/10/how-to-run-multiple-instances-of.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkECRX48eip7ImA9WhNTFEk.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-4885081106020955119</id><published>2012-10-02T18:02:00.001-04:00</published><updated>2012-10-16T23:31:04.072-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-10-16T23:31:04.072-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="accumulo" /><title>How Accumulo Compresses Keys and Values</title><content type="html">From the &lt;code&gt;Acccumulo User&lt;/code&gt; mailing list, Keith T said:&lt;br /&gt;
&lt;blockquote&gt;There are two levels of compression in Accumulo.  First redundant&lt;br /&gt;
parts of the key are not stored.  If the row in a key is the same as&lt;br /&gt;
the previous row, then its not stored again.   The same is done for&lt;br /&gt;
columns and time stamps.   After the relative encoding is done a block&lt;br /&gt;
of key values is then compressed with gzip.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As data is read from an RFile, when the row of a key is the same as&lt;br /&gt;
the previous key it will just point to the previous keys row.  This is&lt;br /&gt;
carried forward over the wire.  As keys are transferred, duplicate&lt;br /&gt;
fields in the key are not transferred.&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
General consensus seemed to favor &lt;bold&gt;double compression&lt;/bold&gt; - compression both at the application level (i.e., compress the values) and let Accumulo compress as well (i.e., the relative encoding).&lt;br /&gt;
&lt;br /&gt;
In support of double compression, Ameet K. said:&lt;br /&gt;
&lt;blockquote&gt;I've switched to double compression as per previous posts and&lt;br /&gt;
its working nicely. I see about 10-15% more compression over just&lt;br /&gt;
application level Value compression.&lt;br /&gt;
&lt;/blockquote&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/YsXifriJqBg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/4885081106020955119/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=4885081106020955119" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/4885081106020955119?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/4885081106020955119?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/YsXifriJqBg/how-accumulo-compresses-keys-and-values.html" title="How Accumulo Compresses Keys and Values" /><author><name>David Medinets</name><uri>https://plus.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAeo/mRW2HsX9Ajo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://affy.blogspot.com/2012/10/how-accumulo-compresses-keys-and-values.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkEHRnc8fip7ImA9WhNTFEk.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-2886713849206516677</id><published>2012-08-28T22:09:00.000-04:00</published><updated>2012-10-16T23:30:37.976-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-10-16T23:30:37.976-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="linode" /><category scheme="http://www.blogger.com/atom/ns#" term="accumulo" /><title>Stackscript for Accumulo (on Linode)</title><content type="html">I wanted a way to test the very latest Accumulo code. I could not use any of my existing systems because they were multi-use boxes. So I wrote a Stackscript in order to prepare a Linode server. Note that this script pulls a few files from my affy.com server for simplicity.&lt;br /&gt;
&lt;br /&gt;
Users: hadoop, zookeeper, accumulo&lt;br /&gt;
Password: password&lt;br /&gt;
&lt;br /&gt;
This stackscript downloads, installs and configures hadoop, zookeeper, and accumulo.&lt;br /&gt;
&lt;br /&gt;
Step one is to create your own stackscript. Mine was called "InitializeAccumulo". The idea is that the starter script pulls the actual script from some server so that you don't need to deal with the 'Manage Stackscript' interface. The starter script is:&lt;br /&gt;
&lt;pre&gt;#!/bin/bash
wget http://www.affy.com/linode_build/stackscript -O /tmp/stackscript.sh
chmod +x /tmp/stackscript.sh
/tmp/stackscript.sh
&lt;/pre&gt;&lt;br /&gt;
After the Linode server boots, it will take about 10 minutes to run this script.&lt;br /&gt;
&lt;br /&gt;
Get the latest copy of the stackscript from https://github.com/medined/accumulo_stackscript. &lt;br /&gt;
&lt;br /&gt;
It's now possible to grab the whole project and then run the stackscript manually.&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/wAo0pNK0TQ4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/2886713849206516677/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=2886713849206516677" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/2886713849206516677?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/2886713849206516677?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/wAo0pNK0TQ4/stackscript-for-accumulo-on-linode.html" title="Stackscript for Accumulo (on Linode)" /><author><name>David Medinets</name><uri>https://plus.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAeo/mRW2HsX9Ajo/s512-c/photo.jpg" /></author><thr:total>4</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://affy.blogspot.com/2012/08/stackscript-for-accumulo-on-linode.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0cNRn45fyp7ImA9WhJVEkw.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-196430566643309486</id><published>2012-07-23T19:11:00.000-04:00</published><updated>2012-08-28T23:31:37.027-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-08-28T23:31:37.027-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="accumulo" /><title>Resolving the "Permission Denied" Message On Accumulo Monitor Page</title><content type="html">If your operating system groups are not set correctly, you'll see a "Permission Denied" message under the NameNode section of the Accumulo Monitor page.&lt;br /&gt;
&lt;br /&gt;
This message can be avoided by the following steps:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;sudo groupadd supergroup
sudo useradd -G supergroup accumulo
&lt;/pre&gt;&lt;br /&gt;
Then restart Accumulo. These steps assume that your Accumulo processes are running under the accumulo user. If not, substitute the correct userid.&lt;br /&gt;
&lt;br /&gt;
&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/t_X1FAmzXJ8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/196430566643309486/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=196430566643309486" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/196430566643309486?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/196430566643309486?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/t_X1FAmzXJ8/resolving-permission-denied-message-on.html" title="Resolving the &quot;Permission Denied&quot; Message On Accumulo Monitor Page" /><author><name>David Medinets</name><uri>https://plus.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAeo/mRW2HsX9Ajo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://affy.blogspot.com/2012/07/resolving-permission-denied-message-on.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0UGQXYyfSp7ImA9WhJVEkw.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-8648712675212763020</id><published>2012-07-23T18:25:00.000-04:00</published><updated>2012-08-28T23:33:40.895-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-08-28T23:33:40.895-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="zookeeper" /><title>Resolving "./zookeeper.out: Permission denied" error</title><content type="html">When starting zookeeper, using the following command&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;sudo -u zookeeper $ZOOKEEPER_HOME/bin/zkServer.sh start
&lt;/pre&gt;&lt;br /&gt;
I saw this error:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;Starting zookeeper ... /usr/local/zookeeper/bin/zkServer.sh: line 105: ./zookeeper.out: Permission denied
&lt;/pre&gt;&lt;br /&gt;
I resolved this error by telling zookeeper where I wanted the log file to be placed. Simply edit $ZOOKEEPER_HOME/zkEnv.sh, then add this assignment at the top of the file:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;ZOO_LOG_DIR=/var/log/zookeeper
&lt;/pre&gt;&lt;br /&gt;
Then create that directory:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;sudo mkdir /var/log/zookeeper
sudo chown zookeeper /var/log/zookeeper
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/D6FzBguHYHQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/8648712675212763020/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=8648712675212763020" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/8648712675212763020?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/8648712675212763020?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/D6FzBguHYHQ/resolving-zookeeperout-permission.html" title="Resolving &quot;./zookeeper.out: Permission denied&quot; error" /><author><name>David Medinets</name><uri>https://plus.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAeo/mRW2HsX9Ajo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://affy.blogspot.com/2012/07/resolving-zookeeperout-permission.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YFRnY_fyp7ImA9WhJVEkw.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-4693009573592992818</id><published>2012-07-12T23:53:00.001-04:00</published><updated>2012-08-28T23:31:57.847-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-08-28T23:31:57.847-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="accumulo" /><title>How I Update To A New Version of Accumulo In Development</title><content type="html">There may be a better technique.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;cd /usr/local
tar xvfz /tmp/accumulo-1.5.0-SNAPSHOT-dist.tar.gz
mv accumulo-1.5.0-SNAPSHOT accumulo-1.5.0-SNAPSHOT_`date +%Y_%m_%d`

# Copy the old configuration
cp $ACCUMULO_HOME/conf/* accumulo-1.5.0-SNAPSHOT_`date +%Y_%m_%d`/conf

chown -R accumulo:accumulo accumulo-1.5.0-SNAPSHOT_`date +%Y_%m_%d`

# Switch the symbolic link to the new directory.
ln -s accumulo-1.5.0-SNAPSHOT_`date +%Y_%m_%d` accumulo

sudo su - accumulo
cd $ACCUMULO_HOME
mkdir logs
mkdir walogs

bin/start-all.sh
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/qTQZ3X61q2Y" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/4693009573592992818/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=4693009573592992818" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/4693009573592992818?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/4693009573592992818?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/qTQZ3X61q2Y/how-i-update-to-new-version-of-accumulo.html" title="How I Update To A New Version of Accumulo In Development" /><author><name>David Medinets</name><uri>https://plus.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAeo/mRW2HsX9Ajo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://affy.blogspot.com/2012/07/how-i-update-to-new-version-of-accumulo.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YHQXg8eip7ImA9WhJVEkw.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-5894384324609416361</id><published>2012-07-07T13:48:00.000-04:00</published><updated>2012-08-28T23:32:10.672-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-08-28T23:32:10.672-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="accumulo" /><title>Installing Accumulo on Linode</title><content type="html">I updated my github playground with steps to install Accumulo on a Linode server. The whole process, from buying the server to running the Accumulo shell, took less than 30 minutes. The steps are located at &lt;a target="_blank" href="https://github.com/medined/accumulo_playground/blob/master/README_LINODE.txt"&gt;https://github.com/medined/accumulo_playground/blob/master/README_LINODE.txt&lt;/a&gt;.&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/QsaSG_uiLa8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/5894384324609416361/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=5894384324609416361" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/5894384324609416361?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/5894384324609416361?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/QsaSG_uiLa8/installing-accumulo-on-linode.html" title="Installing Accumulo on Linode" /><author><name>David Medinets</name><uri>https://plus.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAeo/mRW2HsX9Ajo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://affy.blogspot.com/2012/07/installing-accumulo-on-linode.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YNRHc4fSp7ImA9WhJVEkw.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-8063274777323922556</id><published>2012-06-14T20:48:00.001-04:00</published><updated>2012-08-28T23:33:15.935-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-08-28T23:33:15.935-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><title>Where Are the XSSF POI Classes?</title><content type="html">In the poi-ooxml jar file. This fact took me 20 minutes to find. Hopefully, you found this page faster.&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/vrd1Va5i6Nw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/8063274777323922556/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=8063274777323922556" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/8063274777323922556?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/8063274777323922556?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/vrd1Va5i6Nw/where-are-xssf-poi-classes.html" title="Where Are the XSSF POI Classes?" /><author><name>David Medinets</name><uri>https://plus.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAeo/mRW2HsX9Ajo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://affy.blogspot.com/2012/06/where-are-xssf-poi-classes.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YDSH0-fCp7ImA9WhJVEkw.&quot;"><id>tag:blogger.com,1999:blog-3207985.post-7864439296232684263</id><published>2012-06-11T21:51:00.000-04:00</published><updated>2012-08-28T23:32:59.354-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-08-28T23:32:59.354-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="accumulo" /><title>Accumulo: Where is my instance id?</title><content type="html">When running a Java program to interact with Accumulo, I ran into the following exception:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;Exception in thread "main" java.lang.RuntimeException: Accumulo not initialized, there is no instance id at /accumulo/instance_id
    at org.apache.accumulo.core.client.ZooKeeperInstance.getInstanceIDFromHdfs(ZooKeeperInstance.java:263)
    at org.apache.accumulo.server.client.HdfsZooInstance._getInstanceID(HdfsZooInstance.java:123)
    at org.apache.accumulo.server.client.HdfsZooInstance.getInstanceID(HdfsZooInstance.java:116)
&lt;/pre&gt;&lt;br /&gt;
/accumulo/instance_id should be an HDFS directory with just one file whose name is that of the Accumulo instance. For example:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;$ &lt;b&gt;hadoop fs -ls /accumulo/instance_id&lt;/b&gt;
Found 1 items
-rw-r--r--   1 medined supergroup          0 2012-06-11 17:58 /accumulo/instance_id/b519799c-3a51-4c9b-af21-96d577e2c11f
&lt;/pre&gt;&lt;br /&gt;
This issue was resolved when I added the Hadoop configuration directory to my classpath. Making this change enabled the Java program to look at HDFS instead of the local filesystem.&lt;img src="http://feeds.feedburner.com/~r/Codebits-TestedComplexCode/~4/289ytyeHpQQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://affy.blogspot.com/feeds/7864439296232684263/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3207985&amp;postID=7864439296232684263" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/7864439296232684263?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3207985/posts/default/7864439296232684263?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Codebits-TestedComplexCode/~3/289ytyeHpQQ/accumulo-where-is-my-instance-id.html" title="Accumulo: Where is my instance id?" /><author><name>David Medinets</name><uri>https://plus.google.com/106664903665226624029</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-W4xARhlFk4s/AAAAAAAAAAI/AAAAAAAAAeo/mRW2HsX9Ajo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://affy.blogspot.com/2012/06/accumulo-where-is-my-instance-id.html</feedburner:origLink></entry></feed>
