Skip to content

Commit d89e803

Browse files
authored
Merge pull request #129 from ExpediaGroup/feature/gluesynccli_squashed
Added a gluesync CLI and 'cli' fat jar to run for on demand syncing.
2 parents b67269c + 625e11f commit d89e803

28 files changed

Lines changed: 2652 additions & 164 deletions

File tree

.editorconfig

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[*]
2+
indent_size=2
3+
indent_style=space
4+
charset=utf-8
5+
6+
[*.java]
7+
continuation_indent_size=2
8+
trim_trailing_whitespace=true
9+
insert_final_newline=true
10+
max_line_length=120
11+
wildcard_import_limit=999
12+
ij_java_blank_lines_after_imports=1
13+
ij_java_blank_lines_before_imports=1
14+
ij_java_class_count_to_use_import_on_demand=999
15+
ij_java_names_count_to_use_import_on_demand=999
16+
ij_java_imports_layout=$java.**,|,$javax.**,|,$org.**,|,$*,$com.**,|,$com.expedia.**,|,$com.hotels.**,java.**,|,javax.**,|,org.**,|,*,|,com.**,|,com.expedia.**,|,com.hotels.**
17+
ij_java_keep_simple_methods_in_one_line=true
18+
ij_java_keep_simple_lambdas_in_one_line=true
19+
ij_java_keep_simple_classes_in_one_line = true

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
*.iml
1414
*.iws
1515

16+
# VSCode
17+
.vscode
18+
1619
# Netbeans files
1720
nbactions.xml
1821

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
55

6+
## 8.1.12 - 2025-09-15
7+
### Added
8+
- GlueSyncCli with fat jar for on-demand syncing.
69

710
## 8.1.11 - 2025-08-25
811
### Changed

apiary-metastore-events/kafka-metastore-events/kafka-metastore-listener/src/main/java/com/expediagroup/apiary/extensions/events/metastore/kafka/messaging/KafkaMessageSender.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright (C) 2018-2024 Expedia, Inc.
2+
* Copyright (C) 2018-2025 Expedia, Inc.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

apiary-metastore-events/sns-metastore-events/apiary-metastore-consumers/privileges-grantor/privileges-grantor-lambda/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
35
<modelVersion>4.0.0</modelVersion>
46

57
<parent>
@@ -16,7 +18,6 @@
1618
<aws-java-sdk-lambda.version>1.11.390</aws-java-sdk-lambda.version>
1719
<aws-lambda-java-core.version>1.2.0</aws-lambda-java-core.version>
1820
<aws-lambda-java-events.version>2.2.6</aws-lambda-java-events.version>
19-
<system-rules.version>1.19.0</system-rules.version>
2021
<aws-serverless-java-container-core.version>1.3</aws-serverless-java-container-core.version>
2122
</properties>
2223

@@ -66,7 +67,6 @@
6667
<dependency>
6768
<groupId>com.github.stefanbirkner</groupId>
6869
<artifactId>system-rules</artifactId>
69-
<version>${system-rules.version}</version>
7070
<scope>test</scope>
7171
</dependency>
7272
<dependency>
@@ -99,4 +99,4 @@
9999
</plugins>
100100
</build>
101101

102-
</project>
102+
</project>

apiary-metastore-events/sns-metastore-events/apiary-metastore-listener/pom.xml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
1+
<project xmlns="http://maven.apache.org/POM/4.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
24
<modelVersion>4.0.0</modelVersion>
35

46
<parent>
@@ -56,7 +58,6 @@
5658
<dependency>
5759
<groupId>com.github.stefanbirkner</groupId>
5860
<artifactId>system-rules</artifactId>
59-
<version>1.19.0</version>
6061
<scope>test</scope>
6162
</dependency>
6263
<dependency>
@@ -105,7 +106,8 @@
105106
<shadedPattern>${shade.prefix}.com.fasterxml.jackson</shadedPattern>
106107
</relocation>
107108
<relocation>
108-
<!-- Note org.apache.httpcomponents groupId but org.apache.http package, this is relocated due
109+
<!-- Note org.apache.httpcomponents groupId but org.apache.http package, this is
110+
relocated due
109111
to newer version used by com.amazonaws, older version is provided by /usr/lib/hive/ -->
110112
<pattern>org.apache.http</pattern>
111113
<shadedPattern>${shade.prefix}.org.apache.http</shadedPattern>
@@ -121,4 +123,4 @@
121123
</plugin>
122124
</plugins>
123125
</build>
124-
</project>
126+
</project>

hive-event-listeners/apiary-gluesync-listener/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
## Overview
44
The GlueSync event listener is an optional Apiary component which, if enabled, will push metadata updates to an AWS Glue catalog.
55

6+
In addition to the GlueSync event listener, this component contains a CLI that uses the same code for on-demand syncing in case there are operational failures and you need to provide a quick fix. That is documented in [README_CLI.md](README_CLI.md).
7+
68
## Installation
79
The listener can be activated by placing its jar file on the Hive metastore classpath and configuring Hive accordingly. For Apiary
810
this is done in [apiary-metastore-docker](https://github.com/ExpediaGroup/apiary-metastore-docker).
@@ -24,4 +26,3 @@ If an archive is needed, this can be done per table by setting the Hive table pr
2426
This project is available under the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0.html).
2527

2628
Copyright 2018-2019 Expedia, Inc.
27-
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Apiary GlueSync CLI
2+
3+
## Overview
4+
The GlueSync CLI is a CLI that uses the same code as the hive event listener (with some additions) for on-demand syncing of a Hive metastore table to an AWS Glue database.
5+
6+
One major addition for the GlueSync CLI is that it will always sync all partitions (if needed) for a given Hive table as opposed to the event driven sync which expects to receive individual events for each partition.
7+
8+
## Installation
9+
The CLI gets packaged into a single fat jar with all dependencies so that you can run it simply by java -jar <PATHTOJAR>. The jar name is apiary-gluesync-listener-<version>-cli.jar.
10+
11+
# Usage
12+
You need to provide two environment vars, AWS_REGION and THRIFT_CONNECTION_URI. Be careful not to point the THRIFT_URI to a waggledance endpoint or you may sync federated tables (unless you actually want that).
13+
14+
Example:
15+
16+
```
17+
AWS_REGION=us-east-1 THRIFT_CONNECTION_URI=thrift://my.hive.service:9083 java -jar ./target/apiary-gluesync-listener-8.1.12-cli.jar --database-name-regex 'lz_.*' --table-name-regex 'bookings.*' -v
18+
```
19+
20+
For more usage details, pass the "-h" flag.
21+
22+
# Legal
23+
This project is available under the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0.html).
24+
25+
Copyright 2018-2019 Expedia, Inc.

0 commit comments

Comments
 (0)