Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dstreev committed Apr 17, 2023
1 parent 8b261fc commit e2f7373
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<groupId>com.cloudera.utils.hadoop</groupId>
<artifactId>hms-mirror</artifactId>
<version>1.5.4.4-SNAPSHOT</version>
<version>1.5.4.5-SNAPSHOT</version>
<name>hms-mirror</name>

<url>https://github.com/dstreev/hms_mirror</url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,13 @@ public String executeCleanUpSql(Environment environment, String database) {
if (tblMirror.isThereCleanupSql(environment)) {
sb.append("\n-- Cleanup script: ").append(table).append("\n");
for (Pair pair : tblMirror.getCleanUpSql(environment)) {
sb.append(pair.getAction()).append(";\n");
found = Boolean.TRUE;
sb.append(pair.getAction());
// Skip ';' when its a comment
// https://github.com/cloudera-labs/hms-mirror/issues/33
if (!pair.getAction().trim().startsWith("--")) {
sb.append(";\n");
found = Boolean.TRUE;
}
}
} else {
sb.append("\n");
Expand Down Expand Up @@ -225,7 +230,7 @@ public String toReport(Config config, String database) throws JsonProcessingExce
// Issues
if (dbMirror.isThereAnIssue()) {
Set<Environment> environments = Sets.newHashSet(Environment.LEFT, Environment.RIGHT);
for (Environment env: environments) {
for (Environment env : environments) {
List<String> issues = dbMirror.getIssuesList(env);
if (issues != null) {
sb.append("### ").append(env).append("\n\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public enum MessageCode {
STORAGE_MIGRATION_REQUIRED_STRATEGY(19, "STORAGE_MIGRATION requires -sms to set the Data Strategy. Applicable options " +
"are SCHEMA_ONLY, SQL, EXPORT_IMPORT, or HYBRID"),
STORAGE_MIGRATION_REQUIRED_WAREHOUSE_OPTIONS(20,"STORAGE_MIGRATION requires you to specify PATH location for " +
"'managed' and 'external' tables (-swd, -sewd) to migrate storage. These will be appended to the -smn " +
"'managed' and 'external' tables (-wd, -ewd) to migrate storage. These will be appended to the -smn " +
"(storage-migration-namespace) parameter and used to set the 'database' LOCATION and MANAGEDLOCATION properties"),
RIGHT_HS2_DEFINITION_MISSING(21, "The 'RIGHT' HS2 definition is missing. Only STORAGE_MIGRATION or DUMP strategies allow " +
"that definition to be skipped."),
Expand Down

0 comments on commit e2f7373

Please sign in to comment.