Uploaded image for project: 'CDAP'
  1. CDAP
  2. CDAP-6052

local.data.dir as absolute path does not work

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5.0
    • Component/s: CDAP, Master
    • Labels:
    • Release Notes:
      Fixed a bug that allows setting "local.data.dir" in cdap-site.xml to absolute path
    • Rank:
      1|hzzdhb:

      Description

      After much discussion, master's local storage directory is supposed to work as follows, with 2 governing parameters:

      LOCAL_DIR: defaults to /var/tmp/cdap. set from our init scripts/environment and passed in to the JVM as -Duser.dir. The primary reason this exists and will continue to exist is to set the user.dir for the application jars we load, so they have a working directory on startup if needed.

      local.data.dir: which is set in cdap-site.xml, and defines the directory for program jar storage when deploying to Yarn. This defaults to the relative path "data". If this path is relative, it puts it under LOCAL_DIR (/var/tmp/cdap/data). However, if it is an absolute path, it will not use LOCAL_DIR. This is desirable so users can easily configure this directory elsewhere.

      However, specifying an absolute path does not work. Exception thrown during app deploy:

      2016-05-18 21:14:52,205 - ERROR [netty-executor-21:c.c.c.g.h.AppLifecycleHttpHandler$2@380] - Deploy failure
      java.lang.RuntimeException: co.cask.cdap.api.dataset.DatasetManagementException: Failed to add instance business.metadata, details: Response code: 500, message: 'Internal Server Error', body: 'Failed to create directory within 10000 attempts (tried 1463606091703-0 to 1463606091703-9999)'
              at com.google.common.base.Throwables.propagate(Throwables.java:160) ~[com.google.guava.guava-13.0.1.jar:na]
              at co.cask.cdap.data2.datafabric.dataset.DatasetsUtil.createIfNotExists(DatasetsUtil.java:86) ~[co.cask.cdap.cdap-data-fabric-3.4.1.jar:na]
              at co.cask.cdap.data2.datafabric.dataset.DatasetsUtil.getOrCreateDataset(DatasetsUtil.java:67) ~[co.cask.cdap.cdap-data-fabric-3.4.1.jar:na]
              at co.cask.cdap.data2.metadata.store.DefaultMetadataStore.newMetadataDataset(DefaultMetadataStore.java:545) ~[co.cask.cdap.cdap-data-fabric-3.4.1.jar:na]
              at co.cask.cdap.data2.metadata.store.DefaultMetadataStore.execute(DefaultMetadataStore.java:520) ~[co.cask.cdap.cdap-data-fabric-3.4.1.jar:na]
              at co.cask.cdap.data2.metadata.store.DefaultMetadataStore.removeMetadata(DefaultMetadataStore.java:263) ~[co.cask.cdap.cdap-data-fabric-3.4.1.jar:na]
              at co.cask.cdap.data2.metadata.store.DefaultMetadataStore.removeMetadata(DefaultMetadataStore.java:253) ~[co.cask.cdap.cdap-data-fabric-3.4.1.jar:na]
              at co.cask.cdap.internal.app.runtime.artifact.ArtifactRepository.deleteArtifact(ArtifactRepository.java:744) ~[co.cask.cdap.cdap-app-fabric-3.4.1.jar:na]
              at co.cask.cdap.internal.app.services.ApplicationLifecycleService.deployAppAndArtifact(ApplicationLifecycleService.java:312) ~[co.cask.cdap.cdap-app-fabric-3.4.1.jar:na]
              at co.cask.cdap.gateway.handlers.AppLifecycleHttpHandler$2.onFinish(AppLifecycleHttpHandler.java:362) ~[co.cask.cdap.cdap-app-fabric-3.4.1.jar:na]
              at co.cask.cdap.common.http.AbstractBodyConsumer.finished(AbstractBodyConsumer.java:65) [co.cask.cdap.cdap-common-3.4.1.jar:na]
              at co.cask.http.HttpMethodInfo.bodyConsumerFinish(HttpMethodInfo.java:149) [co.cask.http.netty-http-0.14.0.jar:na]
              at co.cask.http.HttpMethodInfo.chunk(HttpMethodInfo.java:108) [co.cask.http.netty-http-0.14.0.jar:na]
              at co.cask.http.HttpDispatcher.messageReceived(HttpDispatcher.java:40) [co.cask.http.netty-http-0.14.0.jar:na]
              at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) [io.netty.netty-3.6.6.Final.jar:na]
              at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) [io.netty.netty-3.6.6.Final.jar:na]
              at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) [io.netty.netty-3.6.6.Final.jar:na]
              at org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43) [io.netty.netty-3.6.6.Final.jar:na]
              at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67) [io.netty.netty-3.6.6.Final.jar:na]
              at org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:314) [io.netty.netty-3.6.6.Final.jar:na]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_75]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_75]
              at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                terence Terence Yim
                Reporter:
                derek Derek Wood
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: