将数据加载到Druid时出错

时间:2018-07-30 14:42:04

标签: java apache-zookeeper properties-file druid

我是druid的新手,试图通过本地文件加载数据。我已经设置了节点和zookeeper实例。我已经在Ubuntu 18.04中尝试了这个并且运行正常,但是我尝试在lUbuntu中使用它,但是我看到了错误下方:

2018-07-30T12:25:03,390 ERROR [main] io.druid.cli.CliPeon - Error when starting up.  Failing.
com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) Error in custom provider, java.lang.OutOfMemoryError
  at io.druid.guice.DruidProcessingModule.getIntermediateResultsPool(DruidProcessingModule.java:110) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> io.druid.guice.DruidProcessingModule)
  at io.druid.guice.DruidProcessingModule.getIntermediateResultsPool(DruidProcessingModule.java:110) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> io.druid.guice.DruidProcessingModule)
  while locating io.druid.collections.NonBlockingPool<java.nio.ByteBuffer> annotated with @io.druid.guice.annotations.Global()
    for the 2nd parameter of io.druid.query.groupby.GroupByQueryEngine.<init>(GroupByQueryEngine.java:81)
  at io.druid.guice.QueryRunnerFactoryModule.configure(QueryRunnerFactoryModule.java:88) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> io.druid.guice.QueryRunnerFactoryModule)
  while locating io.druid.query.groupby.GroupByQueryEngine
    for the 2nd parameter of io.druid.query.groupby.strategy.GroupByStrategyV1.<init>(GroupByStrategyV1.java:77)
  while locating io.druid.query.groupby.strategy.GroupByStrategyV1
    for the 2nd parameter of io.druid.query.groupby.strategy.GroupByStrategySelector.<init>(GroupByStrategySelector.java:43)
  while locating io.druid.query.groupby.strategy.GroupByStrategySelector
    for the 1st parameter of io.druid.query.groupby.GroupByQueryQueryToolChest.<init>(GroupByQueryQueryToolChest.java:104)
  at io.druid.guice.QueryToolChestModule.configure(QueryToolChestModule.java:101) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> io.druid.guice.QueryRunnerFactoryModule)
  while locating io.druid.query.groupby.GroupByQueryQueryToolChest
  while locating io.druid.query.QueryToolChest annotated with @com.google.inject.multibindings.Element(setName=,uniqueId=80, type=MAPBINDER, keyType=java.lang.Class<? extends io.druid.query.Query>)
  at io.druid.guice.DruidBinders.queryToolChestBinder(DruidBinders.java:45) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> io.druid.guice.QueryRunnerFactoryModule -> com.google.inject.multibindings.MapBinder$RealMapBinder)
  while locating java.util.Map<java.lang.Class<? extends io.druid.query.Query>, io.druid.query.QueryToolChest>
    for the 1st parameter of io.druid.query.MapQueryToolChestWarehouse.<init>(MapQueryToolChestWarehouse.java:36)
  while locating io.druid.query.MapQueryToolChestWarehouse
  while locating io.druid.query.QueryToolChestWarehouse
    for the 1st parameter of io.druid.server.QueryLifecycleFactory.<init>(QueryLifecycleFactory.java:52)
  at io.druid.server.QueryLifecycleFactory.class(QueryLifecycleFactory.java:52)
  while locating io.druid.server.QueryLifecycleFactory
    for the 1st parameter of io.druid.server.QueryResource.<init>(QueryResource.java:113)
  at io.druid.server.QueryResource.class(QueryResource.java:78)
  while locating io.druid.server.QueryResource
Caused by: java.lang.OutOfMemoryError
    at sun.misc.Unsafe.allocateMemory(Native Method)
    at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:127)
    at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311)
    at io.druid.offheap.OffheapBufferGenerator.get(OffheapBufferGenerator.java:53)
    at io.druid.offheap.OffheapBufferGenerator.get(OffheapBufferGenerator.java:29)
    at io.druid.collections.StupidPool.makeObjectWithHandler(StupidPool.java:112)
    at io.druid.collections.StupidPool.<init>(StupidPool.java:83)
    at io.druid.guice.DruidProcessingModule.getIntermediateResultsPool(DruidProcessingModule.java:115)
    at io.druid.guice.DruidProcessingModule$$FastClassByGuice$$8e266e5c.invoke(<generated>)
    at com.google.inject.internal.ProviderMethod$FastClassProviderMethod.doProvision(ProviderMethod.java:264)
    at com.google.inject.internal.ProviderMethod$Factory.provision(ProviderMethod.java:401)
    at com.google.inject.internal.ProviderMethod$Factory.get(ProviderMethod.java:376)
    at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)

我确实尝试增加了中层管理器的内存,但前提是这是导致问题的原因,但是那没有用。  任何帮助,将不胜感激。  谢谢!

2 个答案:

答案 0 :(得分:0)

您应该修改五个进程的内存并重新启动

答案 1 :(得分:0)

我认为您需要增加直接缓冲存储器。 请参阅:https://groups.google.com/forum/#!topic/druid-user/clGruLMHAgU

在中间管理器配置中,您将找到此选项 druid.indexer.runner.javaOpts将其设置为更高的值-XX:MaxDirectMemorySize = 4g

引用:druid.io/docs/latest/configuration/index.html