Skip to content

Commit 8e7c568

Browse files
committed
Exposed rid for web ui.
1 parent 753f441 commit 8e7c568

File tree

12 files changed

+66
-12
lines changed

12 files changed

+66
-12
lines changed

Writerside/topics/Release-Notes.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ The latest set of enhancement requests can be
1111
found [here](https://github.com/cloudera-labs/hms-mirror/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement). If there is
1212
something you'd like to see, add a new issue [here](https://github.com/cloudera-labs/hms-mirror/issues)
1313

14+
## 2.2.0.5
15+
16+
[CLI Setup Issues](https://github.com/cloudera-labs/hms-mirror/issues/120)
17+
[Stale Config after several runs](https://github.com/cloudera-labs/hms-mirror/issues/118)
18+
[SQL Strategy Transfer Fixes](https://github.com/cloudera-labs/hms-mirror/issues/117)
19+
[Partition Reductions for Distcp](https://github.com/cloudera-labs/hms-mirror/issues/116)
20+
1421
## 2.2.0.4
1522

1623
### Bugs

Writerside/topics/Runtime-Interfaces.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,44 @@ The classic 'hms-mirror' interface is the command line interface (CLI). This is
55
The CLI interface requires users to define a configuration file that the is used to control connection endpoints, and cluster attributes. Runtime operations are controlled by command line options that are passed to the application.
66

77
The Web interface provides a much more complete experience for users and allows configurations to be built and validated in a more interactive way. The Web interface is the preferred interface for users who are new to the application and we encourage existing users to adopt this interface as well since it's capabilities and usability a vast improvement over the CLI.
8+
9+
> We understand that a big part of the attraction to the CLI was its simple commandline interface and feedback UI. And under many circumstances, the CLI was a natural choice due to security restrictions and port exposure in CDP environments. However, the Web interface offers a much more robust and user-friendly experience. See below for some suggestions on how to gain access to the Web Interface in environments with security restrictions.
10+
11+
## Accessing the Web Interface in Secure Environments
12+
13+
Ports for the Web Interface may not be available in secure enviroments. By default, the Web Interface is available on port '8090'.
14+
15+
### Option #1: Alternate Port
16+
17+
If '8090' isn't available, you can change the port by adding the following to the service start up command:
18+
19+
```bash
20+
hms-mirror --service --server.port=<new_port>
21+
```
22+
23+
### Option #2: SSH Tunnel
24+
25+
If you can SSH into the host where the service is running, you can most likely create a tunnel to the service port that will allow you to access the Web Interface. Here's an example:
26+
27+
```bash
28+
ssh -L 8090:<remote_host>:8090 <user>@<remote_host>
29+
```
30+
31+
This will create a tunnel from your local machine to the remote host. Any traffic you send to `localhost:8090` will be forwarded to the remote host's port `8090`. Once the tunnel is established, you can open a browser and navigate to `http://localhost:8090/hms-mirror` to access the Web Interface.
32+
33+
Here is a good article on SSH Tunnels: [SSH Tunneling](https://www.ssh.com/ssh/tunneling/example)
34+
35+
### Option #3: Dynamic Port Forwarding
36+
37+
Again, this method relies on SSH access to the remote host. It also requires advanced SOCKS configuration in your browser. You first create a dynamic port forward with SSH:
38+
39+
```bash
40+
ssh -D <choose_a_port> <user>@<remote_host>
41+
```
42+
43+
Once that tunnel is established, you can configure your browser to use a SOCKS proxy on `localhost:<choose_a_port>`. This will allow you to access the Web Interface through the tunnel.
44+
45+
To access the Web Interface, you would navigate to `http://<remote_host>:8090/hms-mirror` (SOCKS proxy will handle the routing).
46+
47+
48+

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.5</version>
31+
<version>2.2.0.6</version>
3232
<packaging>jar</packaging>
3333

3434
<name>hms-mirror</name>

src/main/java/com/cloudera/utils/hms/mirror/MessageCode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public enum MessageCode {
126126
LEGACY_HIVE_RIGHT_CLUSTER("Legacy Hive is not supported as a 'target' (RIGHT) cluster. clusters->RIGHT->legacyHive"),
127127
LINKED_NO_ACID_SUPPORT("Can't LINK ACID tables. ma|mao options are not valid with LINKED data strategy."),
128128
LINK_TEST_FAILED("Link test failed. Use -slc|--skip-link-check to bypass."),
129-
LINK_TEST_SKIPPED_WITH_IS("Link TEST skipped because you've specified 'Intermediate Storage' option"),
129+
LINK_TEST_SKIPPED_WITH_OPTIONS("Link TEST skipped because you've specified an option that indicates the right isn't available/attached ('right-is-disconnected' or 'intermediate-storage')"),
130130
LOCATION_NOT_MATCH_WAREHOUSE("After all the translations, the `{0}` " +
131131
"location is still NOT aligned in the DBs warehouse. `{1}`->`{2}`. Consider adding a warehouse plan, a glm mapping, or resetting to default locations to align them"),
132132
METASTORE_DIRECT_NOT_DEFINED_OR_CONFIGURED("The {0} metastore_direct is NOT defined or configured in the runtime configuration. " +

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1130,7 +1130,7 @@ && isBlank(config.getTransfer().getIntermediateStorage())
11301130
rtn = Boolean.FALSE;
11311131
}
11321132
} else {
1133-
runStatus.addWarning(LINK_TEST_SKIPPED_WITH_IS);
1133+
runStatus.addWarning(LINK_TEST_SKIPPED_WITH_OPTIONS);
11341134
}
11351135
}
11361136
break;

src/main/resources/messages.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ RIGHT.cluster=Target (RIGHT)
1515
hive.server2.legacy=Legacy Hive
1616
hcfs.namespace=HCFS Namespace
1717
hcfs.namespace.use=(Used for Link Checks)
18+
hive.server2.disconnected=Disconnected (Valid for RIGHT only)
1819
hive.server2.uri=JDBC URI
1920
hive.server2.driver=Driver Class
2021
hive.server2.user=Username

src/main/resources/templates/fragments/config/hiveserver2.html

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
<legend th:text="#{hive.server2}"/>
3535

3636
<!-- <div class="pure-form pure-form-aligned">-->
37-
<input type="hidden"
38-
th:field="*{clusters[__${env}__].hiveServer2.disconnected}"
39-
th:checked="${CONFIG.clusters[__${env}__]?.hiveServer2?.disconnected}"/>
37+
<!-- <input type="hidden"-->
38+
<!-- th:field="*{clusters[__${env}__].hiveServer2.disconnected}"-->
39+
<!-- th:checked="${CONFIG.clusters[__${env}__]?.hiveServer2?.disconnected}"/>-->
4040
<input type="hidden"
4141
th:field="*{clusters[__${env}__].hiveServer2.connectionProperties[maxTotal]}"
4242
th:value="${CONFIG.clusters[__${env}__].hiveServer2?.connectionProperties[maxTotal]}"/>
@@ -53,7 +53,12 @@
5353
<!-- <input type="hidden"-->
5454
<!-- th:field="*{clusters[__${env}__].hiveServer2.connectionProperties[maxWaitMillis]}"-->
5555
<!-- th:value="${CONFIG.clusters[__${env}__].hiveServer2?.connectionProperties[maxWaitMillis]}"/>-->
56-
56+
<div class="pure-control-group">
57+
<label th:text="#{hive.server2.disconnected}"/>
58+
<input type="checkbox"
59+
th:field="*{clusters[__${env}__].hiveServer2.disconnected}"
60+
th:checked="${CONFIG.clusters[__${env}__]?.hiveServer2?.disconnected}"/>
61+
</div>
5762
<div class="pure-control-group">
5863
<label th:text="#{hive.server2.uri}"/>
5964
<textarea rows="2" cols="50"

src/test/java/com/cloudera/utils/hms/mirror/config/Test_ei_rdl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public void warningCodeTest() {
8585
long actual = getWarningCode();
8686
// Verify the return code.
8787
long expected = getCheckCode(
88-
MessageCode.LINK_TEST_SKIPPED_WITH_IS,
88+
MessageCode.LINK_TEST_SKIPPED_WITH_OPTIONS,
8989
// MessageCode.DISTCP_OUTPUT_NOT_REQUESTED,
9090
MessageCode.DATABASE_FILTER_CONTROLLED_BY,
9191
MessageCode.WAREHOUSE_DIRECTORIES_NOT_DEFINED

src/test/java/com/cloudera/utils/hms/mirror/config/Test_ei_rdl_dc.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public void warningCodeTest() {
8888
long expected = getCheckCode(
8989
// MessageCode.DISTCP_WO_TABLE_FILTERS,
9090
// MessageCode.RDL_DC_WARNING_TABLE_ALIGNMENT,
91-
MessageCode.LINK_TEST_SKIPPED_WITH_IS,
91+
MessageCode.LINK_TEST_SKIPPED_WITH_OPTIONS,
9292
// MessageCode.DISTCP_OUTPUT_NOT_REQUESTED,
9393
MessageCode.DATABASE_FILTER_CONTROLLED_BY,
9494
MessageCode.WAREHOUSE_DIRECTORIES_NOT_DEFINED

src/test/java/com/cloudera/utils/hms/mirror/config/Test_hybrid_rdl_dc.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public void warningCodeTest() {
8686
long actual = getWarningCode();
8787
// Verify the return code.
8888
long expected = getCheckCode(
89-
MessageCode.LINK_TEST_SKIPPED_WITH_IS,
89+
MessageCode.LINK_TEST_SKIPPED_WITH_OPTIONS,
9090
MessageCode.DATABASE_FILTER_CONTROLLED_BY,
9191
MessageCode.WAREHOUSE_DIRECTORIES_NOT_DEFINED
9292
);

0 commit comments

Comments
 (0)