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

[Improvement] Change document manage-fileset-metadata-using-gravitino as the API has changed #6519

Closed
yuqi1129 opened this issue Feb 25, 2025 · 2 comments
Assignees
Labels
improvement Improvements on everything

Comments

@yuqi1129
Copy link
Contributor

What would you like to be improved?

When I create a fileset as stated in the document:

Image
 curl -X POST -H "Content-Type: application/json" -d '{
  "name": "test_fileset_0",
   "type": "FILESET",
  "comment": "my test fileset",
  "provider": "hadoop",
  "properties": {
    "location": "hdfs://suspicious_dhawan.orb.local:33126/user/hive/warehouse/test/test_fileset_0"
  }
}' http://localhost:8090/api/metalakes/test/catalogs/hadoop_catalog/schemas/schema/filesets

{"code":1001,"type":"IllegalArgumentException","message":"Malformed json request","stack":["com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `org.apache.gravitino.file.Fileset$Type` from String \"FILESET\": not one of the values accepted for Enum class: [EXTERNAL, MANAGED]"," at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 2, column: 65] (through reference chain: org.apache.gravitino.dto.requests.FilesetCreateRequest[\"type\"])","\tat com.fasterxml.jackson.databind.exc.InvalidFormatException.from(InvalidFormatException.java:67)","\tat com.fasterxml.jackson.databind.DeserializationContext.weirdStringException(DeserializationContext.java:2002)","\tat com.fasterxml.jackson.databind.DeserializationContext.handleWeirdStringValue(DeserializationContext.java:1230)","\tat com.fasterxml.jackson.databind.deser.std.EnumDeserializer._deserializeAltString(EnumDeserializer.java:415)","\tat com.fasterxml.jackson.databind.deser.std.EnumDeserializer._fromString(EnumDeserializer.java:279)","\tat com.fasterxml.jackson.databind.deser.std.EnumDeserializer.deserialize(EnumDeserializer.java:248)","\tat com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:138)","\tat com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:314)","\tat com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)","\tat com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323)","\tat com.fasterxml.jackson.databind.ObjectReader._bind(ObjectReader.java:2079)","\tat com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1229)","\tat org.glassfish.jersey.jackson.internal.jackson.jaxrs.base.ProviderBase.readFrom(ProviderBase.java:829)","\tat org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.invokeReadFrom(ReaderInterceptorExecutor.java:233)","\tat org.glassfish.jersey.message.internal.Reade

Then I changed the value of type to MANAGED and execute again, then I met the following error:

{"code":1001,"type":"IllegalArgumentException","message":"Malformed json request","stack":["com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field \"provider\" (class org.apache.gravitino.dto.requests.FilesetCreateRequest), not marked as ignorable (5 known properties: \"storageLocation\", \"type\", \"name\", \"comment\", \"properties\"])"," at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 4, column: 16] (through reference chain: org.apache.gravitino.dto.requests.FilesetCreateRequest[\"provider\"])","\tat com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)","\tat com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:1138)","\tat com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:2224)","\tat com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1709)","\tat com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1687)","\tat com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:320)","\tat com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)","\tat com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323)","\tat com.fasterxml.jackson.databind.ObjectReader._bind(ObjectReader.java:2079)","\tat com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1229)","\tat org.glassfish.jersey.jackson.internal.jackson.jaxrs.base.ProviderBase.readFrom(ProviderBase.java:829)","\tat org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.invokeReadFrom(ReaderInterceptorExecutor.java:233)","\tat org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.aroundReadFrom(ReaderInterceptorExecutor.java:212)","\tat org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:132)","\tat org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundReadFrom(MappableExcep

The property storageLocation is required NOT location.

How should we improve?

Correct the document or change the code.

@yuqi1129 yuqi1129 added the improvement Improvements on everything label Feb 25, 2025
@Abyss-lord
Copy link
Contributor

I would like to work on it.

@yuqi1129
Copy link
Contributor Author

@Abyss-lord ,
Sorry, I have confirmed that it's just my mistake and there is no problem with it, so I'll close this issue. You can try other issues if you like. Good luck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvements on everything
Projects
None yet
Development

No branches or pull requests

2 participants