@Test public void testImportDirectoryTool() throws Exception { log.info(""); log.info("Setting up initial state of parent before importing directory to child..."); log.info("Adding data to parent..."); log.info("Starting import directory tool. Importing all data after the specified start time: " + YESTERDAY); log.info(""); isImporting = true; copyToolRun(YESTERDAY); final String childUser = accumuloDualInstanceDriver.getChildUser(); final Connector childConnector = ConfigUtils.getConnector(childConfig); accumuloDualInstanceDriver.getChildAccumuloInstanceDriver().setConnector(childConnector); accumuloDualInstanceDriver.getChildAccumuloInstanceDriver().setUpTables(); accumuloDualInstanceDriver.getChildAccumuloInstanceDriver().setUpDao(); final SecurityOperations childSecOps = accumuloDualInstanceDriver.getChildSecOps(); final Authorizations newChildAuths = AccumuloRyaUtils.addUserAuths(childUser, childSecOps, PARENT_AUTH); childSecOps.changeUserAuthorizations(childUser, newChildAuths); final String childAuthString = newChildAuths.toString(); final List<String> duplicateKeys = MergeTool.DUPLICATE_KEY_MAP.get(MRUtils.AC_AUTH_PROP); childConfig.set(MRUtils.AC_AUTH_PROP, childAuthString); for (final String key : duplicateKeys) { childConfig.set(key, childAuthString); } AccumuloRyaUtils.printTablePretty(CHILD_TABLE_PREFIX + RdfCloudTripleStoreConstants.TBL_SPO_SUFFIX, childConfig); final Scanner scanner = AccumuloRyaUtils.getScanner(CHILD_TABLE_PREFIX + RdfCloudTripleStoreConstants.TBL_SPO_SUFFIX, childConfig); final Iterator<Entry<Key, Value>> iterator = scanner.iterator(); int count = 0; while (iterator.hasNext()) { iterator.next(); count++; } log.info(""); log.info("Total rows imported: " + count); log.info(""); assertEquals(20, count); log.info("DONE"); }
public AccumuloInstanceDriver getChildAccumuloInstanceDriver() { return childAccumuloInstanceDriver; }
CopyTool extends AbstractDualInstanceAccumuloMRTool { public AccumuloInstanceDriver getChildAccumuloInstanceDriver() { return childAccumuloInstanceDriver; } }
CopyTool extends AbstractDualInstanceAccumuloMRTool { public AccumuloInstanceDriver getChildAccumuloInstanceDriver() { return childAccumuloInstanceDriver; }  }
CopyTool extends AbstractDualInstanceAccumuloMRTool { public AccumuloInstanceDriver getChildAccumuloInstanceDriver() { return childAccumuloInstanceDriver; }  void setup(); @Override int run(final String[] strings); void createTableIfNeeded(final String childTableName); static Path getPath(final String first, final String... more); void importFilesToChildTable(final String childTableName); void copyLocalToHdfs(final Path localInputPath, final Path hdfsOutputPath); static void copyLocalToHdfs(final Path localInputPath, final Path hdfsOutputPath, final Configuration configuration); void copyHdfsToLocal(final Path hdfsInputPath, final Path localOutputPath); static void copyHdfsToLocal(final Path hdfsInputPath, final Path localOutputPath, final Configuration configuration); int setupAndRun(final String[] args); static void main(final String[] args); static IteratorSetting getStartTimeSetting(final String startTimeString); static IteratorSetting getStartTimeSetting(final Date date); static IteratorSetting getStartTimeSetting(final long time); AccumuloInstanceDriver getChildAccumuloInstanceDriver(); void shutdown(); }
CopyTool extends AbstractDualInstanceAccumuloMRTool { public AccumuloInstanceDriver getChildAccumuloInstanceDriver() { return childAccumuloInstanceDriver; }  void setup(); @Override int run(final String[] strings); void createTableIfNeeded(final String childTableName); static Path getPath(final String first, final String... more); void importFilesToChildTable(final String childTableName); void copyLocalToHdfs(final Path localInputPath, final Path hdfsOutputPath); static void copyLocalToHdfs(final Path localInputPath, final Path hdfsOutputPath, final Configuration configuration); void copyHdfsToLocal(final Path hdfsInputPath, final Path localOutputPath); static void copyHdfsToLocal(final Path hdfsInputPath, final Path localOutputPath, final Configuration configuration); int setupAndRun(final String[] args); static void main(final String[] args); static IteratorSetting getStartTimeSetting(final String startTimeString); static IteratorSetting getStartTimeSetting(final Date date); static IteratorSetting getStartTimeSetting(final long time); AccumuloInstanceDriver getChildAccumuloInstanceDriver(); void shutdown(); static final String COPY_TABLE_LIST_PROP; static final String CREATE_CHILD_INSTANCE_TYPE_PROP; static final String PARENT_TIME_OFFSET_PROP; static final String CHILD_TIME_OFFSET_PROP; static final String NTP_SERVER_HOST_PROP; static final String PARENT_TOMCAT_URL_PROP; static final String CHILD_TOMCAT_URL_PROP; static final String COPY_RUN_TIME_PROP; static final String USE_NTP_SERVER_PROP; static final String USE_COPY_FILE_OUTPUT; static final String COPY_FILE_OUTPUT_PATH; static final String COPY_FILE_OUTPUT_COMPRESSION_TYPE; static final String USE_COPY_FILE_OUTPUT_DIRECTORY_CLEAR; static final String COPY_FILE_IMPORT_DIRECTORY; static final String USE_COPY_FILE_IMPORT; static final String USE_COPY_QUERY_SPARQL; static final String QUERY_STRING_PROP; static final String QUERY_FILE_PROP; }