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

Decreasing number of instances of Worker throws NumberFormatException

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.5.0
    • Fix Version/s: 3.5.0
    • Component/s: CDAP
    • Labels:
      None
    • Release Notes:
      Fixed a bug on changing number of Worker instances in distributed mode.
    • Rank:
      1|hzzkrb:

      Description

      Decreasing number of instances of Worker throws NumberFormatException. Attached are the screenshots

      ERROR [pcontroller-program:default.HelloWorld.worker.NoOpWorker-f077165a-6697-11e6-97da-42010a800023:c.c.c.i.a.r.d.WorkerTwillProgramController@57] - Failed to change worker instances : {runnable=NoOpWorker, newInstances=3, oldInstances=4}
      java.lang.NumberFormatException: For input string: "NoOpWorker"
              at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[na:1.7.0_75]
              at java.lang.Integer.parseInt(Integer.java:492) ~[na:1.7.0_75]
              at java.lang.Integer.valueOf(Integer.java:582) ~[na:1.7.0_75]
              at co.cask.cdap.internal.app.runtime.distributed.WorkerTwillProgramController.doCommand(WorkerTwillProgramController.java:53) ~[co.cask.cdap.cdap-app-fabric-3.5.0-SNAPSHOT.jar:na]
              at co.cask.cdap.internal.app.runtime.AbstractProgramController$8.run(AbstractProgramController.java:262) [co.cask.cdap.cdap-app-fabric-3.5.0-SNAPSHOT.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]
      2016-08-20 05:35:49,034 - ERROR [netty-executor-35:c.c.c.c.HttpExceptionHandler@49] - Unexpected error: request=PUT /v3/namespaces/default/apps/HelloWorld/workers/NoOpWorker/instances user=<null>:
      java.util.concurrent.ExecutionException: java.lang.NumberFormatException: For input string: "NoOpWorker"
              at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:294) ~[com.google.guava.guava-13.0.1.jar:na]
              at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:281) ~[com.google.guava.guava-13.0.1.jar:na]
              at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:116) ~[com.google.guava.guava-13.0.1.jar:na]
              at co.cask.cdap.internal.app.services.ProgramLifecycleService.setWorkerInstances(ProgramLifecycleService.java:573) ~[co.cask.cdap.cdap-app-fabric-3.5.0-SNAPSHOT.jar:na]
              at co.cask.cdap.internal.app.services.ProgramLifecycleService.setInstances(ProgramLifecycleService.java:503) ~[co.cask.cdap.cdap-app-fabric-3.5.0-SNAPSHOT.jar:na]
              at co.cask.cdap.internal.app.services.ProgramLifecycleService.setInstances(ProgramLifecycleService.java:477) ~[co.cask.cdap.cdap-app-fabric-3.5.0-SNAPSHOT.jar:na]
              at co.cask.cdap.gateway.handlers.ProgramLifecycleHttpHandler.setWorkerInstances(ProgramLifecycleHttpHandler.java:864) ~[co.cask.cdap.cdap-app-fabric-3.5.0-SNAPSHOT.jar:na]
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_75]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_75]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_75]
      

      Steps to reproduce:
      1.) Deploy app with worker and start the worker
      2.) while worker is running decrease number of instances

        Attachments

          Activity

            People

            • Assignee:
              terence Terence Yim
              Reporter:
              vinisha Vinisha Shah
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: