Documentation
¶
Overview ¶
Copyright (c) YugabyteDB, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) YugabyteDB, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) YugabyteDB, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- type MigrationEvent
- type VisualizerTableMetrics
- type YugabyteD
- func (cp *YugabyteD) ExportSchemaCompleted(exportSchemaEvent *controlPlane.ExportSchemaCompletedEvent)
- func (cp *YugabyteD) ExportSchemaStarted(exportSchemaEvent *controlPlane.ExportSchemaStartedEvent)
- func (cp *YugabyteD) Finalize()
- func (cp *YugabyteD) ImportSchemaCompleted(importSchemaEvent *controlPlane.ImportSchemaCompletedEvent)
- func (cp *YugabyteD) ImportSchemaStarted(importSchemaEvent *controlPlane.ImportSchemaStartedEvent)
- func (cp *YugabyteD) Init() error
- func (cp *YugabyteD) MigrationAssessmentCompleted(ev *controlPlane.MigrationAssessmentCompletedEvent)
- func (cp *YugabyteD) MigrationAssessmentStarted(ev *controlPlane.MigrationAssessmentStartedEvent)
- func (cp *YugabyteD) MigrationEnded(migrationEndedEvent *controlPlane.MigrationEndedEvent)
- func (cp *YugabyteD) SchemaAnalysisIterationCompleted(schemaAnalysisReport *controlPlane.SchemaAnalysisIterationCompletedEvent)
- func (cp *YugabyteD) SchemaAnalysisStarted(schemaAnalysisEvent *controlPlane.SchemaAnalysisStartedEvent)
- func (cp *YugabyteD) SnapshotExportCompleted(snapshotExportEvent *controlPlane.SnapshotExportCompletedEvent)
- func (cp *YugabyteD) SnapshotExportStarted(snapshotExportEvent *controlPlane.SnapshotExportStartedEvent)
- func (cp *YugabyteD) SnapshotImportCompleted(snapshotImportEvent *controlPlane.SnapshotImportCompletedEvent)
- func (cp *YugabyteD) SnapshotImportStarted(snapshotImportEvent *controlPlane.SnapshotImportStartedEvent)
- func (cp *YugabyteD) UpdateExportedRowCount(snapshotExportTablesMetrics []*controlPlane.UpdateExportedRowCountEvent)
- func (cp *YugabyteD) UpdateImportedRowCount(snapshotImportTableMetrics []*controlPlane.UpdateImportedRowCountEvent)
Constants ¶
const VISUALIZER_METADATA_SCHEMA = "ybvoyager_visualizer"
const YUGABYTED_METADATA_TABLE_NAME = VISUALIZER_METADATA_SCHEMA + "." + "ybvoyager_visualizer_metadata"
const YUGABYTED_TABLE_METRICS_TABLE_NAME = VISUALIZER_METADATA_SCHEMA + "." + "ybvoyager_visualizer_table_metrics"
Variables ¶
var MIGRATION_PHASE_MAP = map[string]int{
"ASSESS MIGRATION": 1,
"EXPORT SCHEMA": 2,
"ANALYZE SCHEMA": 3,
"EXPORT DATA": 4,
"IMPORT SCHEMA": 5,
"IMPORT DATA": 6,
}
var UPDATE_ROW_COUNT_STATUS_STR_TO_INT = map[string]int{
"NOT STARTED": 0,
"IN PROGRESS": 1,
"DONE": 2,
"COMPLETED": 3,
}
Functions ¶
This section is empty.
Types ¶
type MigrationEvent ¶
type MigrationEvent struct { MigrationUUID uuid.UUID `json:"migration_uuid"` MigrationPhase int `json:"migration_phase"` InvocationSequence int `json:"invocation_sequence"` MigrationDirectory string `json:"migration_dir"` DatabaseName string `json:"database_name"` SchemaName string `json:"schema_name"` Payload string `json:"payload"` DBType string `json:"db_type"` Status string `json:"status"` InvocationTimestamp string `json:"invocation_timestamp"` }
type VisualizerTableMetrics ¶
type VisualizerTableMetrics struct { MigrationUUID uuid.UUID `json:"migration_uuid"` TableName string `json:"table_name"` Schema string `json:"schema_name"` MigrationPhase int `json:"migration_phase"` Status int `json:"status"` //(0: NOT-STARTED, 1: IN-PROGRESS, 2: DONE, 3: COMPLETED) CountLiveRows int64 `json:"count_live_rows"` CountTotalRows int64 `json:"count_total_rows"` InvocationTimestamp string `json:"invocation_timestamp"` }
Table metrics for both Export and Import steps.
type YugabyteD ¶
func (*YugabyteD) ExportSchemaCompleted ¶
func (cp *YugabyteD) ExportSchemaCompleted(exportSchemaEvent *controlPlane.ExportSchemaCompletedEvent)
func (*YugabyteD) ExportSchemaStarted ¶
func (cp *YugabyteD) ExportSchemaStarted(exportSchemaEvent *controlPlane.ExportSchemaStartedEvent)
func (*YugabyteD) Finalize ¶
func (cp *YugabyteD) Finalize()
Wait for events to publish and Close the connection.
func (*YugabyteD) ImportSchemaCompleted ¶
func (cp *YugabyteD) ImportSchemaCompleted(importSchemaEvent *controlPlane.ImportSchemaCompletedEvent)
func (*YugabyteD) ImportSchemaStarted ¶
func (cp *YugabyteD) ImportSchemaStarted(importSchemaEvent *controlPlane.ImportSchemaStartedEvent)
func (*YugabyteD) MigrationAssessmentCompleted ¶ added in v1.7.0
func (cp *YugabyteD) MigrationAssessmentCompleted(ev *controlPlane.MigrationAssessmentCompletedEvent)
func (*YugabyteD) MigrationAssessmentStarted ¶ added in v1.7.0
func (cp *YugabyteD) MigrationAssessmentStarted(ev *controlPlane.MigrationAssessmentStartedEvent)
func (*YugabyteD) MigrationEnded ¶
func (cp *YugabyteD) MigrationEnded(migrationEndedEvent *controlPlane.MigrationEndedEvent)
func (*YugabyteD) SchemaAnalysisIterationCompleted ¶
func (cp *YugabyteD) SchemaAnalysisIterationCompleted(schemaAnalysisReport *controlPlane.SchemaAnalysisIterationCompletedEvent)
func (*YugabyteD) SchemaAnalysisStarted ¶
func (cp *YugabyteD) SchemaAnalysisStarted(schemaAnalysisEvent *controlPlane.SchemaAnalysisStartedEvent)
func (*YugabyteD) SnapshotExportCompleted ¶
func (cp *YugabyteD) SnapshotExportCompleted(snapshotExportEvent *controlPlane.SnapshotExportCompletedEvent)
func (*YugabyteD) SnapshotExportStarted ¶
func (cp *YugabyteD) SnapshotExportStarted(snapshotExportEvent *controlPlane.SnapshotExportStartedEvent)
func (*YugabyteD) SnapshotImportCompleted ¶
func (cp *YugabyteD) SnapshotImportCompleted(snapshotImportEvent *controlPlane.SnapshotImportCompletedEvent)
func (*YugabyteD) SnapshotImportStarted ¶
func (cp *YugabyteD) SnapshotImportStarted(snapshotImportEvent *controlPlane.SnapshotImportStartedEvent)
func (*YugabyteD) UpdateExportedRowCount ¶
func (cp *YugabyteD) UpdateExportedRowCount( snapshotExportTablesMetrics []*controlPlane.UpdateExportedRowCountEvent)
func (*YugabyteD) UpdateImportedRowCount ¶
func (cp *YugabyteD) UpdateImportedRowCount( snapshotImportTableMetrics []*controlPlane.UpdateImportedRowCountEvent)