Properties columnProperties = t.getProperties(); if (t.getName() != null && t.getName().equalsIgnoreCase(columnDescriptor.getNameAsString()) && columnProperties != null)
Properties columnProperties = t.getProperties(); if (t.getName() != null && t.getName().equalsIgnoreCase(columnDescriptor.getNameAsString()) && columnProperties != null)
Properties columnProperties = t.getProperties(); if (t.getName() != null && t.getName().equalsIgnoreCase(columnDescriptor.getNameAsString()) && columnProperties != null)
if (table.getProperties() != null) String max = table.getProperties().getProperty(MongoDBConstants.MAX); if (max != null && !max.isEmpty())
if (table.getProperties() != null) String size = table.getProperties().getProperty(MongoDBConstants.SIZE); if (size != null && !size.isEmpty())
/** * Gets the column family properties. * * @param tableInfo * the table info * @return the column family properties */ private Properties getColumnFamilyProperties(TableInfo tableInfo) { if (tables != null) { for (Table table : tables) { if (table != null && table.getName() != null && table.getName().equalsIgnoreCase(tableInfo.getTableName())) { return table.getProperties(); } } } return null; }
/** * @param databaseName * @param tableName * @return */ public boolean isCappedCollection(String databaseName, String tableName) { List<Schema> schemas = getDataStore() != null ? getDataStore().getSchemas() : null; if (schemas != null) { for (Schema schema : schemas) { if (schema != null && schema.getName() != null && schema.getName().equalsIgnoreCase(databaseName)) { for (Table table : schema.getTables()) { if (table.getProperties() != null && tableName.equals(table.getName())) { return Boolean.parseBoolean(table.getProperties().getProperty(MongoDBConstants.CAPPED)); } } } } } return false; }
public Table getColumnFamily(String schemaName, String cfName) { Schema schema = getSchema(schemaName); if (schema != null) { if (schema.getTables() != null) { for (Table table : schema.getTables()) { if (table != null && table.getName() != null && table.getName().equalsIgnoreCase(cfName)) { return table; } } if (logger.isWarnEnabled()) { logger.warn("No column family schema found, returning null."); } } } return null; }
public boolean isCounterColumn(String schemaName, String cfName) { Table table = getColumnFamily(schemaName, cfName); if (table != null) { return table.getProperties().getProperty(CassandraConstants.DEFAULT_VALIDATION_CLASS) .equalsIgnoreCase(CounterColumnType.class.getSimpleName()) ? true : false; } return false; }
Assert.assertNotNull(store.getSchemas().get(0).getTables()); Assert.assertEquals(1, store.getSchemas().get(0).getTables().size()); Assert.assertEquals("HBASEUSERXYZ", store.getSchemas().get(0).getTables().get(0).getName()); Assert.assertNotNull(store.getSchemas().get(0).getTables().get(0).getProperties()); Assert.assertEquals(5, store.getSchemas().get(0).getTables().get(0).getProperties().size()); Assert.assertNotNull(store.getSchemas().get(0).getTables()); Assert.assertEquals(2, store.getSchemas().get(0).getTables().size()); Assert.assertEquals("CASSANDRAUSERXYZ", store.getSchemas().get(0).getTables().get(0).getName()); Assert.assertNotNull(store.getSchemas().get(0).getTables().get(0).getProperties()); Assert.assertEquals(7, store.getSchemas().get(0).getTables().get(0).getProperties().size()); Assert.assertNotNull(store.getSchemas().get(0).getDataCenters()); Assert.assertEquals(2, store.getSchemas().get(0).getDataCenters().size());
if (table.getProperties() != null) String max = table.getProperties().getProperty(MongoDBConstants.MAX); if (max != null && !max.isEmpty())
if (table.getProperties() != null) String size = table.getProperties().getProperty(MongoDBConstants.SIZE); if (size != null && !size.isEmpty())
/** * @param databaseName * @param tableName * @return */ public boolean isCappedCollection(String databaseName, String tableName) { List<Schema> schemas = getDataStore() != null ? getDataStore().getSchemas() : null; if (schemas != null) { for (Schema schema : schemas) { if (schema != null && schema.getName() != null && schema.getName().equalsIgnoreCase(databaseName)) { for (Table table : schema.getTables()) { if (table.getProperties() != null && tableName.equals(table.getName())) { return Boolean.parseBoolean(table.getProperties().getProperty(MongoDBConstants.CAPPED)); } } } } } return false; }
/** * Read external properties. */ private void readExternalProperties() { schemas = HBasePropertyReader.hsmd.getDataStore() != null ? HBasePropertyReader.hsmd.getDataStore() .getSchemas() : null; List<Table> tables = null; if (schemas != null && !schemas.isEmpty()) { for (Schema s : schemas) { if (s.getName() != null && s.getName().equalsIgnoreCase(databaseName)) { tables = s.getTables(); } } } if (tables != null && !tables.isEmpty()) { for (Table table : tables) { externalProperties.put(HBaseUtils.getHTableName(databaseName, table.getName()), table.getProperties()); } } }
/** * Gets the column family properties. * * @param tableInfo * the table info * @return the column family properties */ private Properties getColumnFamilyProperties(TableInfo tableInfo) { if (tables != null) { for (Table table : tables) { if (table != null && table.getName() != null && table.getName().equalsIgnoreCase(tableInfo.getTableName())) { return table.getProperties(); } } } return null; }
public Table getColumnFamily(String schemaName, String cfName) { Schema schema = getSchema(schemaName); if (schema != null) { if (schema.getTables() != null) { for (Table table : schema.getTables()) { if (table != null && table.getName() != null && table.getName().equalsIgnoreCase(cfName)) { return table; } } if (logger.isWarnEnabled()) { logger.warn("No column family schema found, returning null."); } } } return null; }
public boolean isCounterColumn(String schemaName, String cfName) { Table table = getColumnFamily(schemaName, cfName); if (table != null) { return table.getProperties().getProperty(CassandraConstants.DEFAULT_VALIDATION_CLASS) .equalsIgnoreCase(CounterColumnType.class.getSimpleName()) ? true : false; } return false; }