| 56 | } |
| 57 | |
| 58 | func (m *tableSchemaMutator) GetTable(namespace, name string) (table *metaCom.Table, err error) { |
| 59 | var schemaProto pb.EntityConfig |
| 60 | schemaProto, _, err = m.readSchema(namespace, name) |
| 61 | if err != nil { |
| 62 | return |
| 63 | } |
| 64 | |
| 65 | if schemaProto.Tomstoned { |
| 66 | return nil, metaCom.ErrTableDoesNotExist |
| 67 | } |
| 68 | |
| 69 | table = &metaCom.Table{} |
| 70 | table.Config = metaCom.TableConfig{ |
| 71 | BatchSize: metastore.DefaultBatchSize, |
| 72 | ArchivingIntervalMinutes: metastore.DefaultArchivingIntervalMinutes, |
| 73 | ArchivingDelayMinutes: metastore.DefaultArchivingDelayMinutes, |
| 74 | BackfillMaxBufferSize: metastore.DefaultBackfillMaxBufferSize, |
| 75 | BackfillIntervalMinutes: metastore.DefaultBackfillIntervalMinutes, |
| 76 | BackfillThresholdInBytes: metastore.DefaultBackfillThresholdInBytes, |
| 77 | BackfillStoreBatchSize: metastore.DefaultBackfillStoreBatchSize, |
| 78 | RecordRetentionInDays: metastore.DefaultRecordRetentionInDays, |
| 79 | SnapshotIntervalMinutes: metastore.DefaultSnapshotIntervalMinutes, |
| 80 | SnapshotThreshold: metastore.DefaultSnapshotThreshold, |
| 81 | RedoLogRotationInterval: metastore.DefaultRedologRotationInterval, |
| 82 | MaxRedoLogFileSize: metastore.DefaultMaxRedoLogSize, |
| 83 | } |
| 84 | |
| 85 | err = json.Unmarshal(schemaProto.Config, &table) |
| 86 | return table, err |
| 87 | } |
| 88 | |
| 89 | func (m *tableSchemaMutator) CreateTable(namespace string, table *metaCom.Table, force bool) (err error) { |
| 90 | if !force { |