public void addTable(Text tableName) throws AccumuloException, AccumuloSecurityException {
      if(this.simulate) {
        LOG.info("Simulating adding table: {}", tableName);
      } else {
        LOG.debug("Adding table: {}", tableName);
        BatchWriter bw = null;
        String table = tableName.toString();
        if(this.createTables && !this.conn.tableOperations().exists(table)) {
          try {
            this.conn.tableOperations().create(table);
          } catch (AccumuloSecurityException var8) {
            LOG.error("Accumulo security violation creating {}", table, var8);
            throw var8;
          } catch (TableExistsException var9) {
            LOG.warn("Table Exists {}", table, var9);
          }
        }

        try {
          bw = this.mtbw.getBatchWriter(table);
        } catch (TableNotFoundException var5) {
          LOG.error("Accumulo table {} doesn't exist and cannot be created.", table, var5);
          throw new AccumuloException(var5);
        }

        if(bw != null) {
          this.bws.put(tableName, bw);
        }

      }
    }
Extension of AccumuloOutputFormat to support indexing.
accumulo-handler/src/java/org/apache/hadoop/hive/accumulo/mr/AccumuloIndexedOutputFormat.java