@Override public TableSpec getTableSpec() { validate(); Map<String, String> tableSpecConfig = new HashMap<>(); generateTableSpecConfig(tableSpecConfig); if (cache != null) { tableSpecConfig.put(CachingTableProvider.CACHE_TABLE_ID, ((BaseTableDescriptor) cache).getTableSpec().getId()); } else { if (readTtl != null) { tableSpecConfig.put(CachingTableProvider.READ_TTL_MS, String.valueOf(readTtl.toMillis())); } if (writeTtl != null) { tableSpecConfig.put(CachingTableProvider.WRITE_TTL_MS, String.valueOf(writeTtl.toMillis())); } if (cacheSize > 0) { tableSpecConfig.put(CachingTableProvider.CACHE_SIZE, String.valueOf(cacheSize)); } } tableSpecConfig.put(CachingTableProvider.REAL_TABLE_ID, ((BaseTableDescriptor) table).getTableSpec().getId()); tableSpecConfig.put(CachingTableProvider.WRITE_AROUND, String.valueOf(isWriteAround)); return new TableSpec(tableId, serde, CachingTableProviderFactory.class.getName(), tableSpecConfig); }
@Override public TableSpec getTableSpec() { validate(); Map<String, String> tableSpecConfig = new HashMap<>(); generateTableSpecConfig(tableSpecConfig); if (cache != null) { tableSpecConfig.put(CachingTableProvider.CACHE_TABLE_ID, ((BaseTableDescriptor) cache).getTableSpec().getId()); } else { if (readTtl != null) { tableSpecConfig.put(CachingTableProvider.READ_TTL_MS, String.valueOf(readTtl.toMillis())); } if (writeTtl != null) { tableSpecConfig.put(CachingTableProvider.WRITE_TTL_MS, String.valueOf(writeTtl.toMillis())); } if (cacheSize > 0) { tableSpecConfig.put(CachingTableProvider.CACHE_SIZE, String.valueOf(cacheSize)); } } tableSpecConfig.put(CachingTableProvider.REAL_TABLE_ID, ((BaseTableDescriptor) table).getTableSpec().getId()); tableSpecConfig.put(CachingTableProvider.WRITE_AROUND, String.valueOf(isWriteAround)); return new TableSpec(tableId, serde, CachingTableProviderFactory.class.getName(), tableSpecConfig); }
@Override public TableSpec getTableSpec() { validate(); Map<String, String> tableSpecConfig = new HashMap<>(); generateTableSpecConfig(tableSpecConfig); if (cache != null) { tableSpecConfig.put(CachingTableProvider.CACHE_TABLE_ID, ((BaseTableDescriptor) cache).getTableSpec().getId()); } else { if (readTtl != null) { tableSpecConfig.put(CachingTableProvider.READ_TTL_MS, String.valueOf(readTtl.toMillis())); } if (writeTtl != null) { tableSpecConfig.put(CachingTableProvider.WRITE_TTL_MS, String.valueOf(writeTtl.toMillis())); } if (cacheSize > 0) { tableSpecConfig.put(CachingTableProvider.CACHE_SIZE, String.valueOf(cacheSize)); } } tableSpecConfig.put(CachingTableProvider.REAL_TABLE_ID, ((BaseTableDescriptor) table).getTableSpec().getId()); tableSpecConfig.put(CachingTableProvider.WRITE_AROUND, String.valueOf(isWriteAround)); return new TableSpec(tableId, serde, CachingTableProviderFactory.class.getName(), tableSpecConfig); }
@Override public TableSpec getTableSpec() { validate(); Map<String, String> tableSpecConfig = new HashMap<>(); generateTableSpecConfig(tableSpecConfig); if (cache != null) { tableSpecConfig.put(CachingTableProvider.CACHE_TABLE_ID, ((BaseTableDescriptor) cache).getTableSpec().getId()); } else { if (readTtl != null) { tableSpecConfig.put(CachingTableProvider.READ_TTL_MS, String.valueOf(readTtl.toMillis())); } if (writeTtl != null) { tableSpecConfig.put(CachingTableProvider.WRITE_TTL_MS, String.valueOf(writeTtl.toMillis())); } if (cacheSize > 0) { tableSpecConfig.put(CachingTableProvider.CACHE_SIZE, String.valueOf(cacheSize)); } } tableSpecConfig.put(CachingTableProvider.REAL_TABLE_ID, ((BaseTableDescriptor) table).getTableSpec().getId()); tableSpecConfig.put(CachingTableProvider.WRITE_AROUND, String.valueOf(isWriteAround)); return new TableSpec(tableId, serde, CachingTableProviderFactory.class.getName(), tableSpecConfig); }