shailee-m opened a new issue #8332:
URL: https://github.com/apache/pinot/issues/8332


   1. I setup Pinot locally with Docker 
(https://docs.pinot.apache.org/basics/getting-started/running-pinot-in-docker)
   2. The server, broker, zookeeper, and controller containers is up and 
running properly
   3. Then for batch ingestion of my data set I run the following command 
   ```
   docker run \
       --network=pinot-demo_default \
       --name pinot-batch-table-creation \
       -v 
/home/shailee/projects/DS/data/lineorder_offline.json:/lineorder_offline.json \
       -v /home/shailee/projects/DS/data/lineorder.json:/lineorder.json \
       apachepinot/pinot:latest AddTable \
       -schemaFile /lineorder_offline.json \
       -tableConfigFile  /lineorder.json \
       -controllerHost manual-pinot-controller \
       -controllerPort 9000 \
       -exec
   
   ```
   
   Which gives the Error 
`org.apache.pinot.common.exception.HttpErrorStatusException: Got error status 
code: 500 (Internal Server Error) with reason: "null" while sending request: 
http://manual-pinot-controller:9000/schemas to controller: c7156692cb71, 
version: Unknown`
   
   When I check the controller logs, I see this error
   ```
   INFO: Started listener bound to [0.0.0.0:9000]
   Mar 10, 2022 5:24:42 AM org.glassfish.grizzly.http.server.HttpServer start
   INFO: [HttpServer] Started.
   2022/03/10 05:24:46.702 INFO [StartServiceManagerCommand] [main] Started 
Pinot [CONTROLLER] instance [Controller_172.20.0.3_9000] at 11.519s since launch
   2022/03/10 06:03:35.374 ERROR [WebApplicationExceptionMapper] 
[grizzly-http-server-4] Server error: 
   java.lang.NullPointerException: null
        at java.util.Objects.requireNonNull(Objects.java:221) ~[?:?]
        at java.util.Optional.<init>(Optional.java:107) ~[?:?]
        at java.util.Optional.of(Optional.java:120) ~[?:?]
        at 
org.apache.pinot.controller.api.access.AccessControlUtils.validatePermission(AccessControlUtils.java:48)
 
~[pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7c181a77289fccb10cea139a097efb5d82f634a]
        at 
org.apache.pinot.controller.api.resources.PinotSchemaRestletResource.addSchema(PinotSchemaRestletResource.java:194)
 
~[pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7c181a77289fccb10cea139a097efb5d82f634a]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
~[?:?]
        at 
jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 ~[?:?]
        at 
jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
        at 
org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52)
 
~[pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7c181a77289fccb10cea139a097efb5d82f634a]
        at 
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:124)
 
~[pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7c181a77289fccb10cea139a097efb5d82f634a]
        at 
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:167)
 
~[pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7c181a77289fccb10cea139a097efb5d82f634a]
        at 
org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:219)
 
~[pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7c181a77289fccb10cea139a097efb5d82f634a]
        at 
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:79)
 
~[pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7c181a77289fccb10cea139a097efb5d82f634a]
        at 
org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:469)
 
~[pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7c181a77289fccb10cea139a097efb5d82f634a]
        at 
org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:391)
 
~[pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7c181a77289fccb10cea139a097efb5d82f634a]
        at 
org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:80)
 
~[pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7c181a77289fccb10cea139a097efb5d82f634a]
        at 
org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:253) 
[pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7c181a77289fccb10cea139a097efb5d82f634a]
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248) 
[pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7c181a77289fccb10cea139a097efb5d82f634a]
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244) 
[pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7c181a77289fccb10cea139a097efb5d82f634a]
        at org.glassfish.jersey.internal.Errors.process(Errors.java:292) 
[pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7c181a77289fccb10cea139a097efb5d82f634a]
        at org.glassfish.jersey.internal.Errors.process(Errors.java:274) 
[pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7c181a77289fccb10cea139a097efb5d82f634a]
        at org.glassfish.jersey.internal.Errors.process(Errors.java:244) 
[pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7c181a77289fccb10cea139a097efb5d82f634a]
        at 
org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265)
 
[pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7c181a77289fccb10cea139a097efb5d82f634a]
        at 
org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:232) 
[pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7c181a77289fccb10cea139a097efb5d82f634a]
        at 
org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:679)
 
[pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7c181a77289fccb10cea139a097efb5d82f634a]
        at 
org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:353)
 
[pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7c181a77289fccb10cea139a097efb5d82f634a]
        at 
org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:200) 
[pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7c181a77289fccb10cea139a097efb5d82f634a]
        at 
org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:569)
 
[pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7c181a77289fccb10cea139a097efb5d82f634a]
        at 
org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:549)
 
[pinot-all-0.10.0-SNAPSHOT-jar-with-dependencies.jar:0.10.0-SNAPSHOT-b7c181a77289fccb10cea139a097efb5d82f634a]
        at java.lang.Thread.run(Thread.java:829) [?:?]
   
   ```
   
   
   Input CSV  Schema
   
   ```
   {
     "schemaName": "lineorder",
     "dimensionFieldSpecs": [
       {
         "name": "LO_LINENUMBER",
         "dataType": "INT"
       },
       {
         "name": "LO_CUSTKEY",
         "dataType": "INT"
       },
       {
         "name": "LO_PARTKEY",
         "dataType": "INT"
       },
       {
         "name": "LO_SUPPKEY",
         "dataType": "INT"
       },
       {
         "name": "LO_ORDERPRIORITY",
         "dataType": "STRING"
       },
       {
         "name": "LO_SHIPPRIORITY",
         "dataType": "INT"
       }
     ],
     "metricFieldSpecs": [
       {
         "name": "LO_QUANTITY",
         "dataType": "INT"
       },
       {
         "name": "LO_EXTENDEDPRICE",
         "dataType": "INT"
       },
       {
         "name": "LO_ORDTOTALPRICE",
         "dataType": "INT"
       },
       {
         "name": "LO_DISCOUNT",
         "dataType": "INT"
       },
       {
         "name": "LO_REVENUE",
         "dataType": "INT"
       },
       {
         "name": "LO_SUPPLYCOST",
         "dataType": "INT"
       },
       {
         "name": "LO_TAX",
         "dataType": "INT"
       }
     ],
     "dateTimeFieldSpecs": [
       {
         "name": "LO_ORDERDATE",
         "dataType": "STRING",
         "format": "1:DAYS:SIMPLE_DATE_FORMAT:yyyy-MM-dd",
         "granularity": "1:DAYS"
       }
     ]
   }
   ```
   
   Pinot Schema
   ```
   {
     "tableName": "lineorder",
     "segmentsConfig": {
       "timeColumnName": "LO_ORDERDATE",
       "timeType": "DAYS",
       "replication": "1",
       "schemaName": "lineorder"
     },
     "tableIndexConfig": {
       "loadMode": "HEAP",
       "invertedIndexColumns": ["LO_CUSTKEY"]
     },
     "tenants": {
       "broker": "DefaultTenant",
       "server": "DefaultTenant"
     },
     "tableType": "OFFLINE",
     "metadata": {
       "customConfigs": {}
     },
     "ingestionConfig": {
       "batchIngestionConfig": {
         "segmentIngestionType": "APPEND",
         "segmentIngestionFrequency": "DAILY",
         "segmentNameSpec": {},
   
         "batchConfigMaps": [
           {
             "inputDirURI": "/home/shailee/projects/DS/data/lineorder",
             "inputFormat": "csv"
           }
         ]
       }
     }
   }
   
   ```
   
   
   
   I always end up with this error. What am I doing wrong? And most importantly 
if there is a mistake in the config or the schema how do I debug the reason for 
such failures. Does it log any validation errors at any place?
   


-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to