NullPointerException thrown when running Tranquility

I’m trying to test out Tranquility. I’m running coordinator, historical, broker, overlord, and middlemanager processes on a single box with local zookeeper (druid-0.10.0). I am using this server.json file to start tranquility (0.8.2):

bin/tranquility server -configFile ./conf/server.json

server.json

{

“dataSources” : [

{

“spec” : {

“dataSchema” : {

“dataSource” : “web-logs”,

“metricsSpec” : [

{

“name” : “count”,

“type” : “count”

}

]

},

“granularitySpec” : {

“segmentGranularity” : “hour”,

“queryGranularity” : “none”,

“type” : “uniform”

},

“parser” : {

“type” : “string”,

“parseSpec” : {

“format” : “tsv”,

“columns” : [

“account_id”,

“domain_id”,

“ip”,

“access_time”,

“request_url”,

“http_status_code”,

“bytes_sent”

],

“delimiter” : “\t”,

“dimensionsSpec” : {

“dimensions” : [

“account_id”,

“domain_id”,

“ip”

]

},

“timestampSpec” : {

“format” : “ruby”,

“column” : “access_time”

}

}

},

“tuningConfig” : {

“type” : “realtime”,

“windowPeriod” : “PT10M”,

“intermediatePersistPeriod” : “PT10M”,

“maxRowsInMemory” : “100000”

}

},

“properties” : {

“task.partitions” : “1”,

“task.replicants” : “1”

}

}

],

“properties” : {

“zookeeper.connect” : “localhost”

}

}

``

I get the following error:

2017-05-10 20:19:31,448 [main] INFO io.druid.guice.JsonConfigurator - Loaded class[class io.druid.guice.ExtensionsConfig] from props[druid.extensions.] as [ExtensionsConfig{searchCurrentClassloader=true, directory=‘extensions’, hadoopDependenciesDir=‘hadoop-dependencies’, hadoopContainerDruidClasspath=‘null’, loadList=null}]

2017-05-10 20:19:31,669 [main] WARN io.druid.segment.indexing.DataSchema - No granularitySpec has been specified. Using UniformGranularitySpec as default.

2017-05-10 20:19:31,692 [main] WARN io.druid.segment.indexing.DataSchema - No parser has been specified

java.lang.NullPointerException

at com.metamx.tranquility.druid.DruidBeams$.fromConfigInternal(DruidBeams.scala:301)

at com.metamx.tranquility.druid.DruidBeams$.fromConfig(DruidBeams.scala:204)

at com.metamx.tranquility.server.http.ServerMain$$anonfun$2.apply(ServerMain.scala:118)

at com.metamx.tranquility.server.http.ServerMain$$anonfun$2.apply(ServerMain.scala:98)

at com.metamx.common.scala.collection.package$MapLikeOps$$anonfun$strictMapValues$1.apply(package.scala:143)

at com.metamx.common.scala.collection.package$MapLikeOps$$anonfun$strictMapValues$1.apply(package.scala:143)

at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)

at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)

at scala.collection.immutable.Map$Map1.foreach(Map.scala:116)

at scala.collection.TraversableLike$class.map(TraversableLike.scala:245)

at scala.collection.AbstractTraversable.map(Traversable.scala:104)

at com.metamx.common.scala.collection.package$MapLikeOps.strictMapValues(package.scala:143)

at com.metamx.tranquility.server.http.ServerMain$.createServlet(ServerMain.scala:98)

at com.metamx.tranquility.server.http.ServerMain$.main(ServerMain.scala:77)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at com.twitter.app.App$$anonfun$nonExitingMain$3.apply(App.scala:168)

at com.twitter.app.App$$anonfun$nonExitingMain$3.apply(App.scala:167)

at scala.Option.foreach(Option.scala:257)

at com.twitter.app.App$class.nonExitingMain(App.scala:167)

at com.metamx.tranquility.server.http.ServerMain$.nonExitingMain(ServerMain.scala:49)

at com.twitter.app.App$class.main(App.scala:133)

at com.metamx.tranquility.server.http.ServerMain$.main(ServerMain.scala:49)

at com.metamx.tranquility.distribution.DistributionMain$.main(DistributionMain.scala:34)

at com.metamx.tranquility.distribution.DistributionMain.main(DistributionMain.scala)

Exception thrown in main on startup

``

Any ideas?

Thanks.

-William

Turns out I needed to pull the granularitySpec and parser up into the dataSchema and that fixed the error.
-William

Glad you got this sorted!