yuqi1129 opened a new issue, #6519:
URL: https://github.com/apache/gravitino/issues/6519

   ### What would you like to be improved?
   
   When I create a fileset as stated in the document:
   
   <img width="1235" alt="Image" 
src="https://github.com/user-attachments/assets/f44a0b7b-2ae7-4ed9-b379-ca4f123ec656";
 />
   
   
   
   
   ```
    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$TerminalReade
 rInterceptor.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:
   
   ```text
   {"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.BeanDeseriali
 zerBase.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.ReaderIntercep
 
torExecutor$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. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to