@Override @Deprecated public void create(String tableName, boolean limitVersion, TimeType timeType) throws AccumuloException, AccumuloSecurityException, TableExistsException { checkArgument(tableName != null, "tableName is null"); checkArgument(timeType != null, "timeType is null"); NewTableConfiguration ntc = new NewTableConfiguration().setTimeType(timeType); if (limitVersion) create(tableName, ntc); else create(tableName, ntc.withoutDefaultIterators()); }
@Override @Deprecated public void create(String tableName, boolean versioningIter, TimeType timeType) throws AccumuloException, AccumuloSecurityException, TableExistsException { NewTableConfiguration ntc = new NewTableConfiguration().setTimeType(timeType); if (versioningIter) create(tableName, ntc); else create(tableName, ntc.withoutDefaultIterators()); }
new NewTableConfiguration().withoutDefaultIterators() .setProperties(Collections.singletonMap(AccumuloProps.TABLE_DELETE_BEHAVIOR, AccumuloProps.TABLE_DELETE_BEHAVIOR_VALUE)));
ntcProps.put(AccumuloProps.TABLE_DELETE_BEHAVIOR, AccumuloProps.TABLE_DELETE_BEHAVIOR_VALUE); NewTableConfiguration ntc = new NewTableConfiguration().withoutDefaultIterators();
NewTableConfiguration ntc = new NewTableConfiguration().withoutDefaultIterators();
NewTableConfiguration ntc = new NewTableConfiguration().withoutDefaultIterators(); ntc.setProperties(ntcProps); conn.tableOperations().create(config.getAccumuloTable(), ntc);
String tableName = getUniqueNames(1)[0]; connector.tableOperations().create(tableName, new NewTableConfiguration().withoutDefaultIterators());
@SuppressWarnings("deprecation") @Test public void tableNameAndLimitVersion() throws Exception { log.info("Starting tableNameAndLimitVersion"); // Create a table with the initial properties Connector connector = getConnector(); String tableName = getUniqueNames(2)[0]; boolean limitVersion = false; connector.tableOperations().create(tableName, new NewTableConfiguration().withoutDefaultIterators()); String tableNameOrig = "originalWithLimitVersion"; connector.tableOperations().create(tableNameOrig, limitVersion); int countNew = numProperties(connector, tableName); int countOrig = compareProperties(connector, tableNameOrig, tableName, null); Assert.assertEquals("Extra properties using the new create method", countOrig, countNew); Assert.assertTrue("Wrong TimeType", checkTimeType(connector, tableName, TimeType.MILLIS)); }
private static void createTable(Connector connector, String tableName) { try { NewTableConfiguration config = new NewTableConfiguration() .withoutDefaultIterators() .setTimeType(TimeType.MILLIS); connector.tableOperations().create(tableName, config); } catch (Exception e) { throw new VertexiumException("Unable to create table " + tableName); } } }
String t1 = namespace + ".1"; c.namespaceOperations().create(namespace); c.tableOperations().create(t1, new NewTableConfiguration().withoutDefaultIterators()); String constraintClassName = NumericValueConstraint.class.getName();
@SuppressWarnings("deprecation") @Test public void tableNameLimitVersionAndTimeType() throws Exception { log.info("Starting tableNameLimitVersionAndTimeType"); // Create a table with the initial properties Connector connector = getConnector(); String tableName = getUniqueNames(2)[0]; boolean limitVersion = false; TimeType tt = TimeType.LOGICAL; connector.tableOperations().create(tableName, new NewTableConfiguration().withoutDefaultIterators().setTimeType(tt)); String tableNameOrig = "originalWithLimitVersionAndTimeType"; connector.tableOperations().create(tableNameOrig, limitVersion, tt); int countNew = numProperties(connector, tableName); int countOrig = compareProperties(connector, tableNameOrig, tableName, null); Assert.assertEquals("Extra properties using the new create method", countOrig, countNew); Assert.assertTrue("Wrong TimeType", checkTimeType(connector, tableName, tt)); }
@Override public void createTable(ByteBuffer login, String tableName, boolean versioningIter, org.apache.accumulo.proxy.thrift.TimeType type) throws org.apache.accumulo.proxy.thrift.AccumuloException, org.apache.accumulo.proxy.thrift.AccumuloSecurityException, org.apache.accumulo.proxy.thrift.TableExistsException, TException { try { if (type == null) type = org.apache.accumulo.proxy.thrift.TimeType.MILLIS; NewTableConfiguration tConfig = new NewTableConfiguration() .setTimeType(TimeType.valueOf(type.toString())); if (!versioningIter) tConfig = tConfig.withoutDefaultIterators(); getConnector(login).tableOperations().create(tableName, tConfig); } catch (TableExistsException e) { throw new org.apache.accumulo.proxy.thrift.TableExistsException(e.toString()); } catch (Exception e) { handleException(e); } }
protected static void ensureTableExists(Connector connector, String tableName, Integer maxVersions, String hdfsContextClasspath, boolean createTable) { try { if (!connector.tableOperations().exists(tableName)) { if (!createTable) { throw new VertexiumException("Table '" + tableName + "' does not exist and 'graph." + GraphConfiguration.CREATE_TABLES + "' is set to false"); } NewTableConfiguration ntc = new NewTableConfiguration() .setTimeType(TimeType.MILLIS) .withoutDefaultIterators(); connector.tableOperations().create(tableName, ntc); if (maxVersions != null) { // The following parameters match the Accumulo defaults for the VersioningIterator IteratorSetting versioningSettings = new IteratorSetting( ACCUMULO_DEFAULT_VERSIONING_ITERATOR_PRIORITY, ACCUMULO_DEFAULT_VERSIONING_ITERATOR_NAME, VersioningIterator.class ); VersioningIterator.setMaxVersions(versioningSettings, maxVersions); EnumSet<IteratorUtil.IteratorScope> scope = EnumSet.allOf(IteratorUtil.IteratorScope.class); connector.tableOperations().attachIterator(tableName, versioningSettings, scope); } } if (hdfsContextClasspath != null) { connector.instanceOperations().setProperty("general.vfs.context.classpath." + CLASSPATH_CONTEXT_NAME + "-" + tableName, hdfsContextClasspath); connector.tableOperations().setProperty(tableName, "table.classpath.context", CLASSPATH_CONTEXT_NAME + "-" + tableName); } } catch (Exception e) { throw new VertexiumException("Unable to create table " + tableName, e); } }
protected static void ensureTableExists(Connector connector, String tableName, Integer maxVersions, String hdfsContextClasspath, boolean createTable) { try { if (!connector.tableOperations().exists(tableName)) { if (!createTable) { throw new VertexiumException("Table '" + tableName + "' does not exist and 'graph." + GraphConfiguration.CREATE_TABLES + "' is set to false"); } NewTableConfiguration ntc = new NewTableConfiguration() .setTimeType(TimeType.MILLIS) .withoutDefaultIterators(); connector.tableOperations().create(tableName, ntc); if (maxVersions != null) { // The following parameters match the Accumulo defaults for the VersioningIterator IteratorSetting versioningSettings = new IteratorSetting( ACCUMULO_DEFAULT_VERSIONING_ITERATOR_PRIORITY, ACCUMULO_DEFAULT_VERSIONING_ITERATOR_NAME, VersioningIterator.class ); VersioningIterator.setMaxVersions(versioningSettings, maxVersions); EnumSet<IteratorUtil.IteratorScope> scope = EnumSet.allOf(IteratorUtil.IteratorScope.class); connector.tableOperations().attachIterator(tableName, versioningSettings, scope); } } if (hdfsContextClasspath != null) { connector.instanceOperations().setProperty("general.vfs.context.classpath." + CLASSPATH_CONTEXT_NAME + "-" + tableName, hdfsContextClasspath); connector.tableOperations().setProperty(tableName, "table.classpath.context", CLASSPATH_CONTEXT_NAME + "-" + tableName); } } catch (Exception e) { throw new VertexiumException("Unable to create table " + tableName, e); } }
String tableName = getUniqueNames(1)[0]; conn.tableOperations().create(tableName, new NewTableConfiguration().withoutDefaultIterators());
new NewTableConfiguration().withoutDefaultIterators()); String master1TableId = connMaster1.tableOperations().tableIdMap().get(master1Table); Assert.assertNotNull(master1TableId); new NewTableConfiguration().withoutDefaultIterators()); String master2TableId = connMaster2.tableOperations().tableIdMap().get(master2Table); Assert.assertNotNull(master2TableId);