This method recreates and registers all {@link ColumnFamilyDescriptor} from Flink's state meta data snapshot.
432694
private List<ColumnFamilyDescriptor> createAndRegisterColumnFamilyDescriptors(
		List<StateMetaInfoSnapshot> stateMetaInfoSnapshots,
		boolean registerTtlCompactFilter) {

		List<ColumnFamilyDescriptor> columnFamilyDescriptors =
			new ArrayList<>(stateMetaInfoSnapshots.size());

		for (StateMetaInfoSnapshot stateMetaInfoSnapshot : stateMetaInfoSnapshots) {
			RegisteredStateMetaInfoBase metaInfoBase =
				RegisteredStateMetaInfoBase.fromMetaInfoSnapshot(stateMetaInfoSnapshot);
			ColumnFamilyDescriptor columnFamilyDescriptor = RocksDBOperationUtils.createColumnFamilyDescriptor(
				metaInfoBase, columnFamilyOptionsFactory, registerTtlCompactFilter ? ttlCompactFiltersManager : null);
			columnFamilyDescriptors.add(columnFamilyDescriptor);
		}
		return columnFamilyDescriptors;
	}
921333
private void rebuildSubscriptionAndNotifyBusOfEffectiveImmediateChange(final EntitySqlDaoWrapperFactory entitySqlDaoWrapperFactory, final DefaultSubscriptionBase subscription,
                                                                           final SubscriptionBaseEvent immediateEvent, final int seqId, final Catalog catalog, final InternalCallContext context) {
        try {
            // We need to rehydrate the subscription, as some events might have been canceled on disk (e.g. future PHASE after while doing a change plan)
            final List<SubscriptionBaseEvent> activeSubscriptionEvents = getEventsForSubscriptionInTransaction(entitySqlDaoWrapperFactory, subscription.getId(), context);
            subscription.rebuildTransitions(activeSubscriptionEvents, catalog);
            notifyBusOfEffectiveImmediateChange(entitySqlDaoWrapperFactory, subscription, immediateEvent, seqId, context);
        } catch (final CatalogApiException e) {
            log.warn("Failed to post effective event for subscriptionId='{}'", subscription.getId(), e);
        }
    }
396018
@Override
    public PropertyWidget<?> create(final ConfiguredPropertyDescriptor propertyDescriptor) {
        // first check if there is a mapping created for this property
        // descriptor
        final PropertyWidget<?> propertyWidget = _propertyWidgetCollection.getMappedPropertyWidget(propertyDescriptor);
        if (propertyWidget != null) {
            return propertyWidget;
        }
        final HiddenProperty hiddenProperty = propertyDescriptor.getAnnotation(HiddenProperty.class);
        if (hiddenProperty != null && hiddenProperty.hiddenForLocalAccess()) {
            return null;
        }
        if (propertyDescriptor.getAnnotation(Deprecated.class) != null) {
            return null;
        }

        if (getComponentBuilder() instanceof AnalyzerComponentBuilder) {
            final AnalyzerComponentBuilder<?> analyzer = (AnalyzerComponentBuilder<?>) getComponentBuilder();
            if (analyzer.isMultipleJobsSupported()) {
                if (analyzer.isMultipleJobsDeterminedBy(propertyDescriptor)) {
                    return new MultipleInputColumnsPropertyWidget(analyzer, propertyDescriptor);
                }
            }
        }

        // check for fitting property widgets by type
        final Class<?> type = propertyDescriptor.getBaseType();

        final Class<? extends PropertyWidget<?>> widgetClass;
        if (propertyDescriptor.isArray()) {
            if (propertyDescriptor.isInputColumn()) {
                widgetClass = MultipleInputColumnsPropertyWidget.class;
            } else if (ReflectionUtils.isString(type)) {
                widgetClass = MultipleStringPropertyWidget.class;
            } else if (type == Dictionary.class) {
                widgetClass = MultipleDictionariesPropertyWidget.class;
            } else if (type == SynonymCatalog.class) {
                widgetClass = MultipleSynonymCatalogsPropertyWidget.class;
            } else if (type == StringPattern.class) {
                widgetClass = MultipleStringPatternPropertyWidget.class;
            } else if (type.isEnum()) {
                widgetClass = MultipleEnumPropertyWidget.class;
            } else if (type == Class.class) {
                widgetClass = MultipleClassesPropertyWidget.class;
            } else if (type == char.class) {
                widgetClass = MultipleCharPropertyWidget.class;
            } else if (ReflectionUtils.isNumber(type)) {
                widgetClass = MultipleNumberPropertyWidget.class;
            } else {
                // not yet implemented
                widgetClass = DummyPropertyWidget.class;
            }
        } else {

            if (propertyDescriptor.isInputColumn()) {
                if (_componentBuilder.getDescriptor().getConfiguredPropertiesByType(InputColumn.class, true).size()
                        == 1) {
                    // if there is only a single input column property, it
                    // will
                    // be displayed using radiobuttons.
                    widgetClass = SingleInputColumnRadioButtonPropertyWidget.class;
                } else {
                    // if there are multiple input column properties, they
                    // will
                    // be displayed using combo boxes.
                    widgetClass = SingleInputColumnComboBoxPropertyWidget.class;
                }
            } else if (ReflectionUtils.isCharacter(type)) {
                widgetClass = SingleCharacterPropertyWidget.class;
            } else if (ReflectionUtils.isString(type)) {
                widgetClass = SingleStringPropertyWidget.class;
            } else if (ReflectionUtils.isBoolean(type)) {
                widgetClass = SingleBooleanPropertyWidget.class;
            } else if (ReflectionUtils.isNumber(type)) {
                widgetClass = SingleNumberPropertyWidget.class;
            } else if (ReflectionUtils.isDate(type)) {
                widgetClass = SingleDatePropertyWidget.class;
            } else if (type == Dictionary.class) {
                widgetClass = SingleDictionaryPropertyWidget.class;
            } else if (type == SynonymCatalog.class) {
                widgetClass = SingleSynonymCatalogPropertyWidget.class;
            } else if (type == StringPattern.class) {
                widgetClass = SingleStringPatternPropertyWidget.class;
            } else if (type.isEnum()) {
                widgetClass = SingleEnumPropertyWidget.class;
            } else if (ReflectionUtils.is(type, Resource.class)) {
                widgetClass = SingleResourcePropertyWidget.class;
            } else if (type == File.class) {
                widgetClass = SingleFilePropertyWidget.class;
            } else if (type == Pattern.class) {
                widgetClass = SinglePatternPropertyWidget.class;
            } else if (ReflectionUtils.is(type, Datastore.class)) {
                widgetClass = SingleDatastorePropertyWidget.class;
            } else if (type == Class.class) {
                widgetClass = SingleClassPropertyWidget.class;
            } else if (type == Map.class) {
                final Class<?> genericType1 = propertyDescriptor.getTypeArgument(0);
                final Class<?> genericType2 = propertyDescriptor.getTypeArgument(1);
                if (genericType1 == String.class && genericType2 == String.class) {
                    widgetClass = MapStringToStringPropertyWidget.class;
                } else {
                    // not yet implemented
                    widgetClass = DummyPropertyWidget.class;
                }
            } else {
                // not yet implemented
                widgetClass = DummyPropertyWidget.class;
            }
        }

        final Injector injector = getInjectorForPropertyWidgets(propertyDescriptor);
        return injector.getInstance(widgetClass);
    }
416170
def _reload_columns(self, table_desc):
        
        # FIND ALL INDEXES OF ALIAS
        es_last_updated = self.es_cluster.metatdata_last_updated

        alias = table_desc.name
        canonical_index = self.es_cluster.get_best_matching_index(alias).index
        es_metadata_update_required = not (table_desc.timestamp < es_last_updated)
        metadata = self.es_cluster.get_metadata(force=es_metadata_update_required)

        props = [
            (self.es_cluster.get_index(index=i, type=t, debug=DEBUG), t, m.properties)
            for i, d in metadata.indices.items()
            if alias in d.aliases
            for t, m in [_get_best_type_from_mapping(d.mappings)]
        ]

        # CONFIRM ALL COLUMNS ARE SAME, FIX IF NOT
        dirty = False
        all_comparisions = list(jx.pairwise(props)) + list(jx.pairwise(jx.reverse(props)))
        # NOTICE THE SAME (index, type, properties) TRIPLE FROM ABOVE
        for (i1, t1, p1), (i2, t2, p2) in all_comparisions:
            diff = elasticsearch.diff_schema(p2, p1)
            if not self.settings.read_only:
                for d in diff:
                    dirty = True
                    i1.add_property(*d)
        meta = self.es_cluster.get_metadata(force=dirty).indices[canonical_index]

        data_type, mapping = _get_best_type_from_mapping(meta.mappings)
        mapping.properties["_id"] = {"type": "string", "index": "not_analyzed"}
        columns = self._parse_properties(alias, mapping)
        table_desc.timestamp = es_last_updated
        return columns
449545
protected void deleteRecordFromCounterColumnFamily(Object pKey, String tableName, EntityMetadata metadata,
        ConsistencyLevel consistencyLevel) {
        ColumnPath path = new ColumnPath(tableName);

        Cassandra.Client conn = null;
        Object pooledConnection = null;
        try {
            pooledConnection = getConnection();
            conn = (org.apache.cassandra.thrift.Cassandra.Client) getConnection(pooledConnection);

            if (log.isInfoEnabled()) {
                log.info("Removing data for counter column family {}.", tableName);
            }

            conn.remove_counter((CassandraUtilities.toBytes(pKey, metadata.getIdAttribute().getJavaType())), path,
                consistencyLevel);

        } catch (Exception e) {
            log.error("Error during executing delete, Caused by: .", e);
            throw new PersistenceException(e);
        } finally {
            releaseConnection(pooledConnection);
        }
    }
192320
private <T extends BaseColumnDescriptor> T createColumnDescriptor(BaseColumn column, Class<T> descriptorType,
                                                                      Map<String, ColumnTypeDescriptor> columnTypes, Store store) {
        T columnDescriptor = store.create(descriptorType);
        columnDescriptor.setName(column.getName());
        columnDescriptor.setNullable(column.isNullable());
        columnDescriptor.setSize(column.getSize());
        columnDescriptor.setDecimalDigits(column.getDecimalDigits());
        ColumnDataType columnDataType = column.getColumnDataType();
        ColumnTypeDescriptor columnTypeDescriptor = getColumnTypeDescriptor(columnDataType, columnTypes, store);
        columnDescriptor.setColumnType(columnTypeDescriptor);
        return columnDescriptor;
    }
613937
protected synchronized void snapshotAll() {
        snapshotsManager.getAll().forEach(s -> {
            RepositorySnapshotter.SnapshotIdentifier id = s.prepare();
            s.snapshot(repository.getData(), id);
            s.commit(journalsStorage.getLastStoreVersion(), id);
        });
    }
1057799
private HTableDescriptor prepareTableDescriptor(String tableName,
      String entitySchemaString) {
    HTableDescriptor descriptor = new HTableDescriptor(
        Bytes.toBytes(tableName));
    AvroEntitySchema entitySchema = parser
        .parseEntitySchema(entitySchemaString);
    Set<String> familiesToAdd = entitySchema.getColumnMappingDescriptor()
        .getRequiredColumnFamilies();
    familiesToAdd.add(new String(Constants.SYS_COL_FAMILY));
    familiesToAdd.add(new String(Constants.OBSERVABLE_COL_FAMILY));
    for (String familyToAdd : familiesToAdd) {
      if (!descriptor.hasFamily(familyToAdd.getBytes())) {
        descriptor.addFamily(new HColumnDescriptor(familyToAdd));
      }
    }
    return descriptor;
  }
410181
@Override
    public KeyComponent createClusteringColumnReferenceComponent(Facet parent, PojoBinding<?> pojoBinding, NamingStrategy namingStrategy) {
        throw new HecateException("@ClusteringColumn facet \"%s\" references class with composite keys", parent.getName());
    }
1132970
public static <T> TableSink<T> findAndCreateTableSink(Descriptor descriptor) {
		Map<String, String> properties = descriptor.toProperties();

		TableSink tableSink;
		try {
			tableSink = TableFactoryService
				.find(TableSinkFactory.class, properties)
				.createTableSink(properties);
		} catch (Throwable t) {
			throw new TableException("findAndCreateTableSink failed.", t);
		}

		return tableSink;
	}
1076212
@java.lang.Deprecated
  public java.util.Map<java.lang.String, com.google.bigtable.admin.v2.ColumnFamily>
      getColumnFamilies() {
    return getColumnFamiliesMap();
  }
184454
@Override
    protected void populateColumnSchema(ArrayList<ColumnInfo> columns) {
        super.populateColumnSchema(columns);
        columns.add(new ColumnInfo(VoltSystemProcedure.CNAME_SITE_ID, VoltSystemProcedure.CTYPE_ID));
        columns.add(new ColumnInfo(Columns.PARTITION_ID, VoltType.BIGINT));
        columns.add(new ColumnInfo(Columns.SOURCE_NAME, VoltType.STRING));
        columns.add(new ColumnInfo(Columns.EXPORT_TARGET, VoltType.STRING));
        columns.add(new ColumnInfo(Columns.ACTIVE, VoltType.STRING));
        columns.add(new ColumnInfo(Columns.TUPLE_COUNT, VoltType.BIGINT));
        columns.add(new ColumnInfo(Columns.TUPLE_PENDING, VoltType.BIGINT));
        columns.add(new ColumnInfo(Columns.LAST_QUEUED_TIMESTAMP, VoltType.TIMESTAMP));
        columns.add(new ColumnInfo(Columns.LAST_ACKED_TIMESTAMP, VoltType.TIMESTAMP));
        columns.add(new ColumnInfo(Columns.AVERAGE_LATENCY, VoltType.BIGINT));
        columns.add(new ColumnInfo(Columns.MAX_LATENCY, VoltType.BIGINT));
        columns.add(new ColumnInfo(Columns.QUEUE_GAP, VoltType.BIGINT));
        columns.add(new ColumnInfo(Columns.STATUS, VoltType.STRING));
    }
382909
private ColumnFamily processModifications(ColumnFamily changesCF)
    {
        ColumnFamilyStore cfs = Keyspace.open(getKeyspaceName()).getColumnFamilyStore(changesCF.id());

        ColumnFamily resultCF = changesCF.cloneMeShallow();

        List<CounterUpdateCell> counterUpdateCells = new ArrayList<>(changesCF.getColumnCount());
        for (Cell cell : changesCF)
        {
            if (cell instanceof CounterUpdateCell)
                counterUpdateCells.add((CounterUpdateCell)cell);
            else
                resultCF.addColumn(cell);
        }

        if (counterUpdateCells.isEmpty())
            return resultCF; // only DELETEs

        ClockAndCount[] currentValues = getCurrentValues(counterUpdateCells, cfs);
        for (int i = 0; i < counterUpdateCells.size(); i++)
        {
            ClockAndCount currentValue = currentValues[i];
            CounterUpdateCell update = counterUpdateCells.get(i);

            long clock = currentValue.clock + 1L;
            long count = currentValue.count + update.delta();

            resultCF.addColumn(new BufferCounterCell(update.name(),
                                                     CounterContext.instance().createGlobal(CounterId.getLocalId(), clock, count),
                                                     update.timestamp()));
        }

        return resultCF;
    }
662702
private ByteBuffer columnNameAsBytes(String column, String columnFamily)
    {
        CfDef columnFamilyDef = getCfDef(columnFamily);
        return columnNameAsBytes(column, columnFamilyDef);
    }
641176
private HTableDescriptor getTableMetaData(List<TableInfo> tableInfos)
    {
        HTableDescriptor tableDescriptor = new HTableDescriptor(databaseName);
        Properties tableProperties = null;
        schemas = HBasePropertyReader.hsmd.getDataStore() != null ? HBasePropertyReader.hsmd.getDataStore()
                .getSchemas() : null;
        if (schemas != null && !schemas.isEmpty())
        {
            for (Schema s : schemas)
            {
                if (s.getName() != null && s.getName().equalsIgnoreCase(databaseName))
                {
                    tableProperties = s.getSchemaProperties();
                    tables = s.getTables();
                }
            }
        }
        for (TableInfo tableInfo : tableInfos)
        {
            if (tableInfo != null)
            {
                HColumnDescriptor hColumnDescriptor = getColumnDescriptor(tableInfo);
                tableDescriptor.addFamily(hColumnDescriptor);
            }
        }
        if (tableProperties != null)
        {
            for (Object o : tableProperties.keySet())
            {
                tableDescriptor.setValue(Bytes.toBytes(o.toString()), Bytes.toBytes(tableProperties.get(o).toString()));
            }
        }
        return tableDescriptor;
    }
689021
private void modifyTable(String tableName, HTableDescriptor newDescriptor) {
    LOG.info("Modifying table " + tableName);
    HColumnDescriptor[] newFamilies = newDescriptor.getColumnFamilies();
    try {
      List<HColumnDescriptor> columnsToAdd = Lists.newArrayList();
      HTableDescriptor currentFamilies = hbaseAdmin
          .getTableDescriptor(Bytes.toBytes(tableName));
      for (HColumnDescriptor newFamily : newFamilies) {
        if (!currentFamilies.hasFamily(newFamily.getName())) {
          columnsToAdd.add(new HColumnDescriptor(newFamily.getName()));
        }
      }
      // Add all the necessary column families
      if (!columnsToAdd.isEmpty()) {
        hbaseAdmin.disableTable(tableName);
        try {
          for (HColumnDescriptor columnToAdd : columnsToAdd) {
            hbaseAdmin.addColumn(tableName, columnToAdd);
          }
        } finally {
          hbaseAdmin.enableTable(tableName);
        }
      }
    } catch (IOException e) {
      throw new DatasetException(e);
    }
  }
726511
@SuppressWarnings("rawtypes")
    protected ColumnFamily getColumnFamilyViaColumnName(String columnFamilyName, Object rowKey) {
        return getColumnFamilyViaColumnName(columnFamilyName, rowKey.getClass());
    }