private boolean initFromExistingTables(String namespace, String compression, List<ChangeSet> changeSets, List<TableDescriptor> currentHtds) {
        logger.info("[{}] Initializing hbase schema from existing tables.", namespace);

        // Replay change sets one by one and compare it against the current hbase schema.
        // If they match, all change sets up to that point are seen as already applied.
        HbaseSchemaCommandManager initCommandManager = new HbaseSchemaCommandManager(namespace, compression);
        List<ChangeSet> appliedChangeSets = new ArrayList<>();
        List<ChangeSet> changeSetsToApply = new ArrayList<>();
        for (ChangeSet changeSet : changeSets) {
            initCommandManager.applyChangeSet(changeSet);
            changeSetsToApply.add(changeSet);
            if (hbaseSchemaVerifier.verifySchemas(initCommandManager.getSchemaSnapshot(), currentHtds)) {
                appliedChangeSets.addAll(changeSetsToApply);
                changeSetsToApply = new ArrayList<>();
            }
        }

        if (appliedChangeSets.isEmpty()) {
            logger.info("[{}] Current table schema does not match any schema from the change sets.", namespace);
        } else {
            List<String> appliedChangeSetIds = appliedChangeSets.stream()
                    .map(ChangeSet::getId).collect(Collectors.toList());
            logger.info("[{}] Change sets already applied : {}", namespace, appliedChangeSetIds);
        }

        List<SchemaChangeLog> executedLogs = schemaChangeLogService.recordChangeSets(namespace, appliedChangeSets);
        if (changeSetsToApply.isEmpty()) {
            logger.info("[{}] Hbase schema already at latest version.", namespace);
            return false;
        }

        HbaseSchemaCommandManager updateCommandManager = new HbaseSchemaCommandManager(namespace, compression, currentHtds);
        return applyChangeSets(updateCommandManager, changeSetsToApply, executedLogs);
    }
This implementation uses the executed schema change logs to compare against the specified {@code changeSets} to
check the current schema status, regardless of how the actual schema looks like.
hbase/hbase-schema/src/main/java/com/navercorp/pinpoint/hbase/schema/service/HbaseSchemaServiceImpl.java