Thanks John! That did it. Is there a good resource for setting up an Accumulo instance? I took a VM that already set it up to get a proof of concept going, and now I want to refactor and go back and set up a box from scratch.
On Sep 13, 2013, at 12:24 PM, John Vines <[email protected]> wrote: > Short answer - update your slaves file to use IP address/hostname that isn't > 127.0.0.1/localhost > > Long answer - teh start-all.sh script uses the items in the slaves files (as > well as the others) as hints for which IP to report in zookeeper. The client > code looks this information up in ZooKeeper to determine which IP it needs to > talk to. So if you have localhost in the slaves file, the tserver will report > that it's running on 127.0.0.1. So when you run client code from a different > box, it reads that it needs to connect to 127.0.0.1 to find that tserver, but > 127.0.0.1 on the client's box points to itself, so the connection fails. > > > On Fri, Sep 13, 2013 at 12:16 PM, Benjamin Parrish > <[email protected]> wrote: > I am having what seems to be a usual error people see, but I am not sure > administratively what to do to fix it. > > This is my code: > > public static void main(String[] args) throws TableNotFoundException, > AccumuloException, AccumuloSecurityException { > String instanceName = "accumulo"; > String zooServers = "10.200.20.37"; > Instance inst = new ZooKeeperInstance(instanceName, zooServers); > > Connector conn = inst.getConnector("root", "secret"); > > Text rowID = new Text("row1"); > Text colFam = new Text("myColFam"); > Text colQual = new Text("myColQual"); > ColumnVisibility colVis = new ColumnVisibility("public"); > long timestamp = System.currentTimeMillis(); > > Value value = new Value("myValue".getBytes()); > > Mutation mutation = new Mutation(rowID); > mutation.put(colFam, colQual, colVis, timestamp, value); > > long memBuf = 1000000L; // bytes to store before sending a batch > long timeout = 1000L; // milliseconds to wait before sending > int numThreads = 10; > > BatchWriter writer = conn.createBatchWriter("table", memBuf, timeout, > numThreads); > > writer.addMutation(mutation); > > writer.close(); > } > > This is the error I see in Eclipse: > > 13/09/13 12:10:22 WARN impl.ServerClient: Failed to find an available server > in the list of servers: [127.0.0.1:9997:9997 (120000)] > > Everything is operational to the best of my knowledge. I can run scans on > tables in the terminal. >
