Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync fork #1

Merged
merged 33 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
316efc2
[#6384] fix: Gravitino default JVM config mismatches with comments fr…
puchengy Feb 4, 2025
71998d9
[#6279] feat (gvfs-fuse): Add gvfs-fuse integration tests for big fil…
diqiu50 Feb 5, 2025
d74ce36
[#6380] fix(postgres-sql): Fix errors for PG backend about `delete...…
yuqi1129 Feb 6, 2025
f4a0ebb
[#6356] improve(CLI): Add tag support for model in CLI (#6360)
Abyss-lord Feb 6, 2025
ca20c94
[MINOR] fix(gvfs): expose the nested exception for better understandi…
jerryshao Feb 6, 2025
4534985
[#6375] improvment(catalog-hadoop): Remove `protobuf-java` to avoid c…
yuqi1129 Feb 6, 2025
b1e5931
[#6394] feat(iceberg): upgrade Iceberg version from 1.5.2 to 1.6.1 (#…
FANNG1 Feb 7, 2025
e85e47d
[#6320] feat (gvfs-fuse): Support mount and umount command for gvfs-f…
diqiu50 Feb 7, 2025
3417fc3
[#6357] feat (gvfs-fuse): Passing file type argument in the Filesyste…
diqiu50 Feb 7, 2025
739dcea
[#6326] Refactor to add a command context to CLI (#6343)
justinmclean Feb 7, 2025
e50e00e
[#6407] improve(client-python): Reorganize the python package (#6408)
jerryshao Feb 8, 2025
a84fd18
[#5900] feat(tag): support tag pre-event to Gravitino server (#5980)
amazingLychee Feb 9, 2025
708b610
[#6409] fix(client-python): Change to use `GenericFileset` for the r…
jerryshao Feb 10, 2025
0dc49ca
[#5932] improve(CLI): Fix the CLI delete the anonymous user (#6359)
Abyss-lord Feb 10, 2025
d883068
[#6419] improve(CLI): Add table command context CLI (#6428)
Abyss-lord Feb 11, 2025
c8ef9b8
[#6415] improve(CLI): Add Fileset command context CLI (#6431)
Abyss-lord Feb 11, 2025
c24f1d6
[#6417] improve(CLI): Add model command context CLI (#6430)
Abyss-lord Feb 11, 2025
086278e
[#6416] improve(CLI): Add schema command context CLI (#6427)
Abyss-lord Feb 11, 2025
1e85c3d
[#6414] improve(CLI): Add catalog command context CLI (#6425)
Abyss-lord Feb 11, 2025
82087ef
[#6418] improve(CLI): Add stream command context CLI (#6434)
Abyss-lord Feb 11, 2025
918fc49
[#6420] improve(CLI): Add column command context CLI (#6436)
Abyss-lord Feb 11, 2025
e7ab441
[MINOR] docs: Fix the description of `Multi-engine support` in `overv…
LuciferYang Feb 11, 2025
734993e
[#6423] improve(CLI): Add tags command context CLI (#6435)
Abyss-lord Feb 11, 2025
67f25ef
[#6421] improve(CLI): Add user and group command context CLI (#6437)
Abyss-lord Feb 11, 2025
423d311
[#6422] improve(CLI): Add roles and owner command context CLI (#6438)
Abyss-lord Feb 11, 2025
4b5d6a5
[#6424] improve(CLI): Refactor getURL in CLI and add context to simpl…
Abyss-lord Feb 12, 2025
4348089
[#6429] Fixed Wrong log format codes (#6433)
aryanmahawar205 Feb 13, 2025
650232c
[#6361] feat(paimon):Support specifying primary keys during create pa…
hdygxsj Feb 13, 2025
d1ec005
[MINOR] docs: polish Iceberg REST server document (#6444)
FANNG1 Feb 13, 2025
794703f
[MINOR] improve(CLI): Remove redundant code in CLI (#6443)
Abyss-lord Feb 13, 2025
cdc5f8f
[#6097] improve(CLI): Add --quiet option to the Gravitino CLI (#6447)
Abyss-lord Feb 13, 2025
300c79b
[#6449] improve(CLI): Refactor getAuth method in CLI (#6451)
Abyss-lord Feb 14, 2025
74435c9
[#6450] fix(web): fix authentication.type issue (#6452)
LauraXia123 Feb 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/common.sh.template
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function addDirToClasspath(){
}

if [[ -z "${GRAVITINO_MEM}" ]]; then
export GRAVITINO_MEM="-Xmx1024m"
export GRAVITINO_MEM="-Xms1024m -Xmx1024m -XX:MaxMetaspaceSize=512m"
fi

if [[ -n "${JAVA_HOME}" ]]; then
Expand Down
3 changes: 3 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ allprojects {
param.environment("NEED_CREATE_DOCKER_NETWORK", "true")
}

val icebergVersion: String = libs.versions.iceberg.get()
param.systemProperty("ICEBERG_VERSION", icebergVersion)

// Change poll image pause time from 30s to 60s
param.environment("TESTCONTAINERS_PULL_PAUSE_TIMEOUT", "60")
val jdbcDatabase = project.properties["jdbcBackend"] as? String ?: "h2"
Expand Down
6 changes: 6 additions & 0 deletions catalogs/catalog-hadoop/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ dependencies {
exclude("org.eclipse.jetty", "*")
exclude("io.netty")
exclude("org.fusesource.leveldbjni")
// Exclude `protobuf-java` 2.5.0 to avoid conflict with a higher version of `protobuf-java`
// in the authorization module. The reason is that the class loader of `catalog-hadoop` is the
// parent of the class loader of the authorization module, so the class loader of `catalog-hadoop`
// will load the class `protobuf-java` 2.5.0 first, which will cause the authorization module to
// fail to load the class `protobuf-java` 3.15.8.
exclude("com.google.protobuf", "protobuf-java")
}
implementation(libs.slf4j.api)
implementation(libs.awaitility)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,39 +33,38 @@ public class CatalogCommandHandler extends CommandHandler {
private final GravitinoCommandLine gravitinoCommandLine;
private final CommandLine line;
private final String command;
private final boolean ignore;
private final String url;
private final CommandContext context;
private final FullName name;
private final String metalake;
private String catalog;
private final String outputFormat;

/**
* Constructs a {@link CatalogCommandHandler} instance.
*
* @param gravitinoCommandLine The Gravitino command line instance.
* @param line The command line arguments.
* @param command The command to execute.
* @param ignore Ignore server version mismatch.
* @param context The command context.
*/
public CatalogCommandHandler(
GravitinoCommandLine gravitinoCommandLine, CommandLine line, String command, boolean ignore) {
GravitinoCommandLine gravitinoCommandLine,
CommandLine line,
String command,
CommandContext context) {
this.gravitinoCommandLine = gravitinoCommandLine;
this.line = line;
this.command = command;
this.ignore = ignore;
this.context = context;

this.url = getUrl(line);
this.name = new FullName(line);
this.metalake = name.getMetalakeName();
this.outputFormat = line.getOptionValue(GravitinoOptions.OUTPUT);
}

/** Handles the command execution logic based on the provided command. */
@Override
protected void handle() {
String userName = line.getOptionValue(GravitinoOptions.LOGIN);
Command.setAuthenticationMode(getAuth(line), userName);
Command.setAuthenticationMode(context.auth(), userName);
List<String> missingEntities = Lists.newArrayList();

if (CommandActions.LIST.equals(command)) {
Expand Down Expand Up @@ -126,12 +125,9 @@ private boolean executeCommand() {
/** Handles the "DETAILS" command. */
private void handleDetailsCommand() {
if (line.hasOption(GravitinoOptions.AUDIT)) {
gravitinoCommandLine.newCatalogAudit(url, ignore, metalake, catalog).validate().handle();
gravitinoCommandLine.newCatalogAudit(context, metalake, catalog).validate().handle();
} else {
gravitinoCommandLine
.newCatalogDetails(url, ignore, outputFormat, metalake, catalog)
.validate()
.handle();
gravitinoCommandLine.newCatalogDetails(context, metalake, catalog).validate().handle();
}
}

Expand All @@ -143,26 +139,22 @@ private void handleCreateCommand() {

Map<String, String> propertyMap = new Properties().parse(properties);
gravitinoCommandLine
.newCreateCatalog(url, ignore, metalake, catalog, provider, comment, propertyMap)
.newCreateCatalog(context, metalake, catalog, provider, comment, propertyMap)
.validate()
.handle();
}

/** Handles the "DELETE" command. */
private void handleDeleteCommand() {
boolean force = line.hasOption(GravitinoOptions.FORCE);
gravitinoCommandLine
.newDeleteCatalog(url, ignore, force, metalake, catalog)
.validate()
.handle();
gravitinoCommandLine.newDeleteCatalog(context, metalake, catalog).validate().handle();
}

/** Handles the "SET" command. */
private void handleSetCommand() {
String property = line.getOptionValue(GravitinoOptions.PROPERTY);
String value = line.getOptionValue(GravitinoOptions.VALUE);
gravitinoCommandLine
.newSetCatalogProperty(url, ignore, metalake, catalog, property, value)
.newSetCatalogProperty(context, metalake, catalog, property, value)
.validate()
.handle();
}
Expand All @@ -171,17 +163,14 @@ private void handleSetCommand() {
private void handleRemoveCommand() {
String property = line.getOptionValue(GravitinoOptions.PROPERTY);
gravitinoCommandLine
.newRemoveCatalogProperty(url, ignore, metalake, catalog, property)
.newRemoveCatalogProperty(context, metalake, catalog, property)
.validate()
.handle();
}

/** Handles the "PROPERTIES" command. */
private void handlePropertiesCommand() {
gravitinoCommandLine
.newListCatalogProperties(url, ignore, metalake, catalog)
.validate()
.handle();
gravitinoCommandLine.newListCatalogProperties(context, metalake, catalog).validate().handle();
}

/** Handles the "UPDATE" command. */
Expand All @@ -193,32 +182,32 @@ private void handleUpdateCommand() {
if (line.hasOption(GravitinoOptions.ENABLE)) {
boolean enableMetalake = line.hasOption(GravitinoOptions.ALL);
gravitinoCommandLine
.newCatalogEnable(url, ignore, metalake, catalog, enableMetalake)
.newCatalogEnable(context, metalake, catalog, enableMetalake)
.validate()
.handle();
}
if (line.hasOption(GravitinoOptions.DISABLE)) {
gravitinoCommandLine.newCatalogDisable(url, ignore, metalake, catalog).validate().handle();
gravitinoCommandLine.newCatalogDisable(context, metalake, catalog).validate().handle();
}

if (line.hasOption(GravitinoOptions.COMMENT)) {
String updateComment = line.getOptionValue(GravitinoOptions.COMMENT);
gravitinoCommandLine
.newUpdateCatalogComment(url, ignore, metalake, catalog, updateComment)
.newUpdateCatalogComment(context, metalake, catalog, updateComment)
.validate()
.handle();
}
if (line.hasOption(GravitinoOptions.RENAME)) {
String newName = line.getOptionValue(GravitinoOptions.RENAME);
gravitinoCommandLine
.newUpdateCatalogName(url, ignore, metalake, catalog, newName)
.newUpdateCatalogName(context, metalake, catalog, newName)
.validate()
.handle();
}
}

/** Handles the "LIST" command. */
private void handleListCommand() {
gravitinoCommandLine.newListCatalogs(url, ignore, outputFormat, metalake).validate().handle();
gravitinoCommandLine.newListCatalogs(context, metalake).validate().handle();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ public class ColumnCommandHandler extends CommandHandler {
private final GravitinoCommandLine gravitinoCommandLine;
private final CommandLine line;
private final String command;
private final boolean ignore;
private final String url;
private final CommandContext context;
private final FullName name;
private final String metalake;
private final String catalog;
Expand All @@ -44,16 +43,18 @@ public class ColumnCommandHandler extends CommandHandler {
* @param gravitinoCommandLine The Gravitino command line instance.
* @param line The command line arguments.
* @param command The command to execute.
* @param ignore Ignore server version mismatch.
* @param context The command context.
*/
public ColumnCommandHandler(
GravitinoCommandLine gravitinoCommandLine, CommandLine line, String command, boolean ignore) {
GravitinoCommandLine gravitinoCommandLine,
CommandLine line,
String command,
CommandContext context) {
this.gravitinoCommandLine = gravitinoCommandLine;
this.line = line;
this.command = command;
this.ignore = ignore;
this.context = context;

this.url = getUrl(line);
this.name = new FullName(line);
this.metalake = name.getMetalakeName();
this.catalog = name.getCatalogName();
Expand All @@ -65,7 +66,7 @@ public ColumnCommandHandler(
@Override
protected void handle() {
String userName = line.getOptionValue(GravitinoOptions.LOGIN);
Command.setAuthenticationMode(getAuth(line), userName);
Command.setAuthenticationMode(context.auth(), userName);

List<String> missingEntities = Lists.newArrayList();
if (catalog == null) missingEntities.add(CommandEntities.CATALOG);
Expand Down Expand Up @@ -120,7 +121,7 @@ private boolean executeCommand() {
private void handleDetailsCommand() {
if (line.hasOption(GravitinoOptions.AUDIT)) {
gravitinoCommandLine
.newColumnAudit(url, ignore, metalake, catalog, schema, table, column)
.newColumnAudit(context, metalake, catalog, schema, table, column)
.validate()
.handle();
} else {
Expand All @@ -144,8 +145,7 @@ private void handleCreateCommand() {

gravitinoCommandLine
.newAddColumn(
url,
ignore,
context,
metalake,
catalog,
schema,
Expand All @@ -164,7 +164,7 @@ private void handleCreateCommand() {
/** Handles the "DELETE" command. */
private void handleDeleteCommand() {
gravitinoCommandLine
.newDeleteColumn(url, ignore, metalake, catalog, schema, table, column)
.newDeleteColumn(context, metalake, catalog, schema, table, column)
.validate()
.handle();
}
Expand All @@ -174,44 +174,43 @@ private void handleUpdateCommand() {
if (line.hasOption(GravitinoOptions.COMMENT)) {
String comment = line.getOptionValue(GravitinoOptions.COMMENT);
gravitinoCommandLine
.newUpdateColumnComment(url, ignore, metalake, catalog, schema, table, column, comment)
.newUpdateColumnComment(context, metalake, catalog, schema, table, column, comment)
.validate()
.handle();
}
if (line.hasOption(GravitinoOptions.RENAME)) {
String newName = line.getOptionValue(GravitinoOptions.RENAME);
gravitinoCommandLine
.newUpdateColumnName(url, ignore, metalake, catalog, schema, table, column, newName)
.newUpdateColumnName(context, metalake, catalog, schema, table, column, newName)
.validate()
.handle();
}
if (line.hasOption(GravitinoOptions.DATATYPE) && !line.hasOption(GravitinoOptions.DEFAULT)) {
String datatype = line.getOptionValue(GravitinoOptions.DATATYPE);
gravitinoCommandLine
.newUpdateColumnDatatype(url, ignore, metalake, catalog, schema, table, column, datatype)
.newUpdateColumnDatatype(context, metalake, catalog, schema, table, column, datatype)
.validate()
.handle();
}
if (line.hasOption(GravitinoOptions.POSITION)) {
String position = line.getOptionValue(GravitinoOptions.POSITION);
gravitinoCommandLine
.newUpdateColumnPosition(url, ignore, metalake, catalog, schema, table, column, position)
.newUpdateColumnPosition(context, metalake, catalog, schema, table, column, position)
.validate()
.handle();
}
if (line.hasOption(GravitinoOptions.NULL)) {
boolean nullable = line.getOptionValue(GravitinoOptions.NULL).equals("true");
gravitinoCommandLine
.newUpdateColumnNullability(
url, ignore, metalake, catalog, schema, table, column, nullable)
.newUpdateColumnNullability(context, metalake, catalog, schema, table, column, nullable)
.validate()
.handle();
}
if (line.hasOption(GravitinoOptions.AUTO)) {
boolean autoIncrement = line.getOptionValue(GravitinoOptions.AUTO).equals("true");
gravitinoCommandLine
.newUpdateColumnAutoIncrement(
url, ignore, metalake, catalog, schema, table, column, autoIncrement)
context, metalake, catalog, schema, table, column, autoIncrement)
.validate()
.handle();
}
Expand All @@ -220,7 +219,7 @@ private void handleUpdateCommand() {
String dataType = line.getOptionValue(GravitinoOptions.DATATYPE);
gravitinoCommandLine
.newUpdateColumnDefault(
url, ignore, metalake, catalog, schema, table, column, defaultValue, dataType)
context, metalake, catalog, schema, table, column, defaultValue, dataType)
.validate()
.handle();
}
Expand All @@ -229,7 +228,7 @@ private void handleUpdateCommand() {
/** Handles the "LIST" command. */
private void handleListCommand() {
gravitinoCommandLine
.newListColumns(url, ignore, metalake, catalog, schema, table)
.newListColumns(context, metalake, catalog, schema, table)
.validate()
.handle();
}
Expand Down
Loading
Loading