/** * Constructs an environment from given FluoConfiguration * * @param configuration Configuration used to configure environment */ public Environment(FluoConfiguration configuration) { config = configuration; conn = AccumuloUtil.getConnector(config); readZookeeperConfig(); if (!conn.getInstance().getInstanceName().equals(accumuloInstance)) { throw new IllegalArgumentException("unexpected accumulo instance name " + conn.getInstance().getInstanceName() + " != " + accumuloInstance); } if (!conn.getInstance().getInstanceID().equals(accumuloInstanceID)) { throw new IllegalArgumentException("unexpected accumulo instance id " + conn.getInstance().getInstanceID() + " != " + accumuloInstanceID); } try { resources = new SharedResources(this); } catch (TableNotFoundException e1) { throw new IllegalStateException(e1); } }