@Override public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, TableExistsException { final String tableName = OptUtil.getTableOpt(cl, shellState); shellState.getAccumuloClient().tableOperations().exportTable(tableName, cl.getArgs()[0]); return 0; }
@Override public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, TableExistsException { final String tableName = OptUtil.getTableOpt(cl, shellState); shellState.getConnector().tableOperations().exportTable(tableName, cl.getArgs()[0]); return 0; }
private void backupTable(Connector conn, FileSystem fileSystem, String tableName, String dir) throws TableNotFoundException, AccumuloException, AccumuloSecurityException, IOException { LOGGER.debug("backing up table " + tableName + " to " + dir); conn.tableOperations().exportTable(tableName, dir); StringBuilder newDistcp = new StringBuilder(); Path distcpPath = getPath(fileSystem, dir, "distcp.txt"); List<String> distcp = getFileLines(fileSystem, distcpPath); for (String file : distcp) { file = file.trim(); if (file.length() == 0) { continue; } if (file.endsWith("exportMetadata.zip")) { newDistcp.append(file); newDistcp.append("\n"); continue; } Path src = new Path(file); Path dest = getPath(fileSystem, dir, src.getName()); copyFile(fileSystem, src, dest); newDistcp.append(dest.toUri().toString()); newDistcp.append("\n"); } writeFile(fileSystem, distcpPath, newDistcp.toString()); }
@Override public void exportTable(ByteBuffer login, String tableName, String exportDir) throws org.apache.accumulo.proxy.thrift.AccumuloException, org.apache.accumulo.proxy.thrift.AccumuloSecurityException, org.apache.accumulo.proxy.thrift.TableNotFoundException, TException { try { getConnector(login).tableOperations().exportTable(tableName, exportDir); } catch (Exception e) { handleExceptionTNF(e); } }
env.getConnector().tableOperations().exportTable(indexTableName, exportDir);
conn.tableOperations().exportTable(srcTable, exportDir.toString());
auditConnector.tableOperations().exportTable(OLD_TEST_TABLE_NAME, exportDir.toString());
break; case 11: ops.exportTable(tableName, namespace + "_dir"); fail(); break;