apache / gravitino

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
https://gravitino.apache.org
Apache License 2.0
1.1k stars 345 forks source link

[Bug report] Create fileset catalog with empty location property success, but can't list schema of the catalog #3985

Closed LauraXia123 closed 4 months ago

LauraXia123 commented 5 months ago

Version

main branch

Describe what's wrong

Create fileset catalog with empty location property success, but can't list schema of the catalog expect:exception when create catalog

Error message and/or stacktrace

{ "code": 1001, "type": "IllegalArgumentException", "message": "Failed to operate schema(s) operation [LIST] under catalog [metalake_demo.catalog_fileset], reason [Can not create a Path from an empty string]", "stack": [ "java.lang.IllegalArgumentException: Can not create a Path from an empty string", "\tat org.apache.hadoop.fs.Path.checkPathArg(Path.java:168)", "\tat org.apache.hadoop.fs.Path.(Path.java:180)", "\tat java.util.Optional.map(Optional.java:215)", "\tat com.datastrato.gravitino.catalog.hadoop.HadoopCatalogOperations.initialize(HadoopCatalogOperations.java:123)", "\tat com.datastrato.gravitino.connector.BaseCatalog.ops(BaseCatalog.java:143)", "\tat com.datastrato.gravitino.catalog.CatalogManager$CatalogWrapper.asSchemas(CatalogManager.java:178)", "\tat com.datastrato.gravitino.catalog.CatalogManager$CatalogWrapper.lambda$doWithSchemaOps$0(CatalogManager.java:100)", "\tat com.datastrato.gravitino.utils.IsolatedClassLoader.withClassLoader(IsolatedClassLoader.java:72)", "\tat com.datastrato.gravitino.catalog.CatalogManager$CatalogWrapper.doWithSchemaOps(CatalogManager.java:98)", "\tat com.datastrato.gravitino.catalog.SchemaOperationDispatcher.lambda$listSchemas$1(SchemaOperationDispatcher.java:76)", "\tat com.datastrato.gravitino.catalog.OperationDispatcher.doWithCatalog(OperationDispatcher.java:101)", "\tat com.datastrato.gravitino.catalog.SchemaOperationDispatcher.listSchemas(SchemaOperationDispatcher.java:74)", "\tat com.datastrato.gravitino.catalog.SchemaNormalizeDispatcher.listSchemas(SchemaNormalizeDispatcher.java:39)", "\tat com.datastrato.gravitino.listener.SchemaEventDispatcher.listSchemas(SchemaEventDispatcher.java:72)", "\tat com.datastrato.gravitino.server.web.ui.EntityOperations.listSchemas(EntityOperations.java:184)", "\tat com.datastrato.gravitino.server.web.ui.EntityOperations.doList(EntityOperations.java:129)", "\tat com.datastrato.gravitino.server.web.ui.EntityOperations.lambda$listEntities$0(EntityOperations.java:110)", "\tat com.datastrato.gravitino.lock.TreeLockUtils.doWithTreeLock(TreeLockUtils.java:35)", "\tat com.datastrato.gravitino.server.web.ui.EntityOperations.lambda$listEntities$1(EntityOperations.java:107)", "\tat java.security.AccessController.doPrivileged(Native Method)", "\tat javax.security.auth.Subject.doAs(Subject.java:422)", "\tat com.datastrato.gravitino.utils.PrincipalUtils.doAs(PrincipalUtils.java:25)", "\tat com.datastrato.gravitino.server.web.Utils.doAs(Utils.java:121)", "\tat com.datastrato.gravitino.server.web.ui.EntityOperations.listEntities(EntityOperations.java:104)", "\tat sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)", "\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)", "\tat java.lang.reflect.Method.invoke(Method.java:498)", "\tat org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52)", "\tat org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:146)", "\tat org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:189)", "\tat org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:176)", "\tat org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:93)", "\tat org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:478)", "\tat org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:400)", "\tat org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:81)", "\tat org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:256)", "\tat org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)", "\tat org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)", "\tat org.glassfish.jersey.internal.Errors.process(Errors.java:292)", "\tat org.glassfish.jersey.internal.Errors.process(Errors.java:274)", "\tat org.glassfish.jersey.internal.Errors.process(Errors.java:244)", "\tat org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265)", "\tat org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:235)", "\tat org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:684)", "\tat org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:394)", "\tat org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:346)", "\tat org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:358)", "\tat org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:311)", "\tat org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:205)", "\tat org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)", "\tat org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1656)", "\tat com.datastrato.gravitino.server.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:59)", "\tat org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)", "\tat org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626)", "\tat com.datastrato.gravitino.server.web.VersioningFilter.doFilter(VersioningFilter.java:97)", "\tat org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)", "\tat org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626)", "\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:552)", "\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)", "\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)", "\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)", "\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)", "\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)", "\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)", "\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440)", "\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)", "\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505)", "\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)", "\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)", "\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)", "\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)", "\tat org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)", "\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)", "\tat org.eclipse.jetty.server.Server.handle(Server.java:516)", "\tat org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)", "\tat org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)", "\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)", "\tat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)", "\tat org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)", "\tat org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)", "\tat org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)", "\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)", "\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)", "\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)", "\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)", "\tat org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)", "\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)", "\tat org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)", "\tat java.lang.Thread.run(Thread.java:750)" ] }

How to reproduce

Create a fileset catalog

curl 'http://{localhost:8090}/api/metalakes/metalake_demo/catalogs' \
  -H 'Accept: application/vnd.gravitino.v1+json' \
  -H 'Accept-Language: zh-CN,zh;q=0.9' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json;charset=UTF-8' \
  --data-raw '{"name":"fileset1","type":"fileset","provider":"hadoop","comment":"","properties":{"location":""}}' \
  --insecure

list schemas of the catalog

Additional context

No response

Leonidas963 commented 4 months ago

I’m interested in working on this issue, I will submit them in batches.