@Override public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, TableExistsException { shellState.getAccumuloClient().tableOperations().importTable(cl.getArgs()[0], cl.getArgs()[1]); return 0; }
private void restoreTables(Connector conn, List<String> tableNames, String hdfsRestoreDirectory) throws TableExistsException, AccumuloSecurityException, AccumuloException { if (!hdfsRestoreDirectory.endsWith("/")) { hdfsRestoreDirectory = hdfsRestoreDirectory + "/"; } for (String tableName : tableNames) { String importDir = hdfsRestoreDirectory + tableName; LOGGER.info("Restoring table " + tableName + " from " + importDir); conn.tableOperations().importTable(tableName, importDir); } }
@Override public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, TableExistsException { shellState.getConnector().tableOperations().importTable(cl.getArgs()[0], cl.getArgs()[1]); return 0; }
@Override public void importTable(ByteBuffer login, String tableName, String importDir) throws org.apache.accumulo.proxy.thrift.AccumuloException, org.apache.accumulo.proxy.thrift.AccumuloSecurityException, org.apache.accumulo.proxy.thrift.TableExistsException, TException { try { getConnector(login).tableOperations().importTable(tableName, importDir); } catch (TableExistsException e) { throw new org.apache.accumulo.proxy.thrift.TableExistsException(e.toString()); } catch (Exception e) { handleException(e); } }
env.getConnector().tableOperations().importTable(tmpIndexTableName, copyDir);
conn.tableOperations().importTable(destTable, importDir.toString());
auditConnector.tableOperations().importTable(NEW_TEST_TABLE_NAME, exportDir.toString());
break; case 2: ops.importTable(tableName, System.getProperty("user.dir") + "/target"); fail(); break;