Skip to content

Commit 77f91ac

Browse files
committed
NPE on SQL with ALIGNED and no WD's.
Added Translation Type to the CLI Options.
1 parent 3ff3045 commit 77f91ac

File tree

5 files changed

+26
-12
lines changed

5 files changed

+26
-12
lines changed

Writerside/topics/Release-Notes.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,26 @@
22

33
## Known Issues
44

5-
The latest set of known issues can be
6-
found [here](https://github.com/cloudera-labs/hms-mirror/issues?q=is%3Aissue+is%3Aopen+label%3Abug)
5+
The latest set of known issues can be found [here](https://github.com/cloudera-labs/hms-mirror/issues?q=is%3Aissue+is%3Aopen+label%3Abug)
76

87
## Enhancement Requests
98

10-
The latest set of enhancement requests can be
11-
found [here](https://github.com/cloudera-labs/hms-mirror/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement).
9+
The latest set of enhancement requests can be found [here](https://github.com/cloudera-labs/hms-mirror/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement).
1210

13-
If there is
14-
something you'd like to see, add a new issue [here](https://github.com/cloudera-labs/hms-mirror/issues)
11+
If there is something you'd like to see, add a new issue [here](https://github.com/cloudera-labs/hms-mirror/issues)
1512

1613
## 2.2.0.15
1714

1815
**What's New**
1916

2017
- Add support for Oracle Metastore Direct Connection
21-
- [SQL Strategy only uses MSCK for partition discovery for Shadow Table](https://github.
22-
com/cloudera-labs/hms-mirror/issues/145)
18+
- [SQL Strategy only uses MSCK for partition discovery for Shadow Table](https://github.com/cloudera-labs/hms-mirror/issues/145)
2319

2420
**Bugs (Fixed)**
2521

2622
- Output and Report Directory Consistency between CLI and Web UI. See docs for more details.
2723
- Postgres Metastore Direct Connection Fixes
28-
- SQL Data Strategy Validation Blockers for Acid tables
29-
-
24+
- SQL Data Strategy Validation Blockers for Acid tables-
3025

3126
## 2.2.0.12
3227

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
<groupId>com.cloudera.utils.hadoop</groupId>
3030
<artifactId>hms-mirror</artifactId>
31-
<version>2.2.0.14.2</version>
31+
<version>2.2.0.15</version>
3232
<packaging>jar</packaging>
3333

3434
<name>hms-mirror</name>

src/main/java/com/cloudera/utils/hms/mirror/cli/HmsMirrorCommandLineOptions.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,6 +1259,18 @@ CommandLineRunner configTransferOwnershipTrue(HmsMirrorConfig hmsMirrorConfig) {
12591259
};
12601260
}
12611261

1262+
@Bean
1263+
@Order(1)
1264+
@ConditionalOnProperty(
1265+
name = "hms-mirror.config.translation-type")
1266+
CommandLineRunner configTranslationType(HmsMirrorConfig hmsMirrorConfig, @Value("${hms-mirror.config.translation-type}") String value) {
1267+
return args -> {
1268+
log.info("translation-type: {}", value);
1269+
hmsMirrorConfig.getTransfer().getStorageMigration().setTranslationType(TranslationTypeEnum.valueOf(value.toUpperCase()));
1270+
};
1271+
}
1272+
1273+
12621274
@Bean
12631275
@Order(1)
12641276
@ConditionalOnProperty(
@@ -1888,6 +1900,12 @@ private Options getOptions() {
18881900
tablePartitionCountFilterOption.setArgName("partition-count");
18891901
options.addOption(tablePartitionCountFilterOption);
18901902

1903+
Option translationTypeOption = new Option("tt", "translation-type", true,
1904+
"Translation Strategy when migrating data. (ALIGNED|RELATIVE) Default is RELATIVE");
1905+
translationTypeOption.setRequired(Boolean.FALSE);
1906+
translationTypeOption.setArgName("translation-type");
1907+
options.addOption(translationTypeOption);
1908+
18911909
Option cfgOption = new Option("cfg", "config", true,
18921910
"Config with details for the HMS-Mirror. Default: $HOME/.hms-mirror/cfg/default.yaml");
18931911
cfgOption.setRequired(false);

src/main/java/com/cloudera/utils/hms/mirror/cli/HmsMirrorCommandLineOptionsEnum.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ public enum HmsMirrorCommandLineOptionsEnum {
9090
TABLE_FILTER_PARTITION_COUNT_LIMIT("tfp", "table-filter-partition-count-limit", "partition-count", ""),
9191
TABLE_FILTER_SIZE_LIMIT("tfs", "table-filter-size-limit", "size MB", ""),
9292
TRANSFER_OWNERSHIP("to", "transfer-ownership", null, ""),
93+
TRANSLATION_TYPE("tt", "translation-type", "type", ""),
9394
VIEW_ONLY("v", "views-only", null, ""),
9495
WAREHOUSE_DIRECTORY("wd", "warehouse-directory", "path", ""),
9596
WAREHOUSE_PLANS("wps", "warehouse-plans", "db=ext-dir:mngd-dir", "");

src/main/java/com/cloudera/utils/hms/mirror/service/DatabaseService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ public boolean buildDBStatements(DBMirror dbMirror) {
662662
break;
663663
}
664664
// Check the location against the ENV warehouse location. If they match, don't set the location.
665-
if (nonNull(envWarehouse)) {
665+
if (nonNull(targetManagedLocation) && nonNull(envWarehouse)) {
666666
String reducedTargetLocation = NamespaceUtils.getParentDirectory(targetManagedLocation);
667667
if (reducedTargetLocation.equals(envWarehouse.getManagedDirectory())) {
668668
// The new target location is the same as the ENV warehouse location. So we're not

0 commit comments

Comments
 (0)