All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.clickzetta.platform.arrow.ArrowIGSTableMeta Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
package com.clickzetta.platform.arrow;

import cz.proto.ingestion.Ingestion;

import cz.proto.ingestion.v2.IngestionV2;

import static cz.proto.ingestion.Ingestion.IGSTableType;

/**
 * wrap for TableMeta & IGSTableType
 * 

* IGSTableType: * CLUSTER, * ACID, * NORMAL */ public class ArrowIGSTableMeta { private long instanceId; private String schemaName; private String tableName; private IngestionV2.StreamSchema tableMeta; private Ingestion.IGSTableType tableType; private boolean requireCommit = false; public ArrowIGSTableMeta() { } public ArrowIGSTableMeta(long instanceId, String schemaName, String tableName, IngestionV2.StreamSchema tableMeta) { this.instanceId = instanceId; this.schemaName = schemaName; this.tableName = tableName; this.tableMeta = tableMeta; IGSTableType igsTableType = IGSTableType.NORMAL; if (tableMeta.hasPrimaryKeySpec()) { igsTableType = IGSTableType.ACID; } else if (tableMeta.hasDistSpec()) { igsTableType = IGSTableType.CLUSTER; } this.tableType = igsTableType; } public long getInstanceId() { return instanceId; } public void setInstanceId(long instanceId) { this.instanceId = instanceId; } public String getSchemaName() { return schemaName; } public void setSchemaName(String schemaName) { this.schemaName = schemaName; } public String getTableName() { return tableName; } public void setTableName(String tableName) { this.tableName = tableName; } public IngestionV2.StreamSchema getTableMeta() { return tableMeta; } public void setTableMeta(IngestionV2.StreamSchema tableMeta) { this.tableMeta = tableMeta; } public IGSTableType getTableType() { return tableType; } public void setTableType(IGSTableType tableType) { this.tableType = tableType; } public boolean isRequireCommit() { return requireCommit; } public void setRequireCommit(boolean requireCommit) { this.requireCommit = requireCommit; } @Override public String toString() { return "ArrowIGSTableMeta{" + "instanceId=" + instanceId + ", schemaName='" + schemaName + '\'' + ", tableName='" + tableName + '\'' + ", tableMeta=" + tableMeta + ", tableType=" + tableType + ", requireCommit=" + requireCommit + '}'; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy