public Namespace getNamespace() { return tableRef.getNamespace(); }
public Namespace getNamespace() { return tableRef.getNamespace(); }
public Namespace getNamespace() { return tableRef.getNamespace(); }
public Namespace getNamespace() { return tableRef.getNamespace(); }
public Namespace getNamespace() { return tableRef.getNamespace(); }
private Optional<KeyValueService> namespaceDelegateFor(TableReference tableRef) { if (!tableRef.isFullyQualifiedName()) { return Optional.empty(); } KeyValueService delegate = delegateByNamespace.get(tableRef.getNamespace()); return Optional.ofNullable(delegate); }
public Namespace getNamespace() { return tableRef.getNamespace(); }
public Namespace getNamespace() { return tableRef.getNamespace(); }
public static CookiesIdxTable of(UserProfileTable table) { return new CookiesIdxTable(table.t, table.tableRef.getNamespace(), ImmutableList.<CookiesIdxTrigger>of()); }
public static CookiesIdxTable of(UserProfileTable table, List<CookiesIdxTrigger> triggers) { return new CookiesIdxTable(table.t, table.tableRef.getNamespace(), triggers); }
@VisibleForTesting static boolean isSweepTableReference(TableReference tableReference) { return tableReference.getNamespace().equals(SweepSchema.INSTANCE.getNamespace()); } }
@Value.Check protected final void check() { Preconditions.checkState( metadataTable().getNamespace().isEmptyNamespace(), "'metadataTable' should have empty namespace'"); }
private TableReference truncateNamespace(TableReference tableRef) { if (tableRef.getNamespace().isEmptyNamespace()) { return tableRef; } String namespace = tableRef.getNamespace().getName(); namespace = truncate(namespace, MAX_NAMESPACE_LENGTH); return TableReference.create(Namespace.create(namespace), tableRef.getTablename()); }
public static FooToIdCondIdxTable of(TwoColumnsTable table) { return new FooToIdCondIdxTable(table.t, table.tableRef.getNamespace(), ImmutableList.<FooToIdCondIdxTrigger>of()); }
public static FooToIdCondIdxTable of(TwoColumnsTable table, List<FooToIdCondIdxTrigger> triggers) { return new FooToIdCondIdxTable(table.t, table.tableRef.getNamespace(), triggers); }
public static Index4IdxTable of(DataTable table, List<Index4IdxTrigger> triggers) { return new Index4IdxTable(table.t, table.tableRef.getNamespace(), triggers); }
public static final byte[] getBytesForTableRef(TableReference tableRef) { byte[] nameSpace = EncodingUtils.encodeVarString(tableRef.getNamespace().getName()); byte[] table = PtBytes.toBytes(tableRef.getTablename()); return Bytes.concat(nameSpace, table); }
private static void createStreamingTable(KeyValueService kvs, TableReference parentTable, String columnName) { StreamStoreDefinition ssd = new StreamStoreDefinitionBuilder(columnName, "Value", ValueType.VAR_LONG) .inMemoryThreshold(1024 * 1024) .build(); ssd.getTables().forEach((tableName, tableDefinition) -> { TableReference streamingTable = TableReference.create(parentTable.getNamespace(), tableName); kvs.createTable(streamingTable, tableDefinition.toTableMetadata().persistToBytes()); }); }
@Test public void createLowerCasedWithoutNamespace() { String upperBar = "BAR"; TableReference upper = TableReference.createWithEmptyNamespace(upperBar); TableReference lower = TableReference.createLowerCased(upper); assertEquals(lower.getNamespace(), Namespace.EMPTY_NAMESPACE); assertEquals(lower.getTablename(), upperBar.toLowerCase()); }
@Test public void createLowerCasedWithNamespace() { String upperFoo = "FOO"; String upperBar = "BAR"; TableReference upper = TableReference.create(Namespace.create(upperFoo), upperBar); TableReference lower = TableReference.createLowerCased(upper); assertEquals(lower.getNamespace().getName(), upperFoo.toLowerCase()); assertEquals(lower.getTablename(), upperBar.toLowerCase()); }