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

JobQueueDataset#fullScan should only scan rows that hold jobs.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.2.0
    • Fix Version/s: 4.2.0
    • Component/s: Scheduler
    • Labels:
      None
    • Rank:
      1|i00373:

      Description

      JobQueueDataset#fullScan should only scan rows that hold jobs. The dataset also holds other information.
      Otherwise, the following WARN will be visible upon cdap startup:

      2017-06-02 21:40:33,426 - WARN  [ STARTING:c.c.c.s.CoreSchedulerService@148] - Failed to cleanup jobs upon startup.
      org.apache.tephra.TransactionFailureException: Exception raised from TxRunnable.run() co.cask.cdap.scheduler.CoreSchedulerService$2@31414dd1
              at co.cask.cdap.data2.transaction.Transactions$CacheBasedTransactional.finishExecute(Transactions.java:237) ~[na:na]
              at co.cask.cdap.data2.transaction.Transactions$CacheBasedTransactional.execute(Transactions.java:223) ~[na:na]
              at co.cask.cdap.data2.transaction.Transactions$5.executeInternal(Transactions.java:295) ~[na:na]
              at co.cask.cdap.data2.transaction.Transactions$5.execute(Transactions.java:282) ~[na:na]
              at co.cask.cdap.scheduler.CoreSchedulerService.cleanupJobs(CoreSchedulerService.java:130) [na:na]
              at co.cask.cdap.scheduler.CoreSchedulerService.access$100(CoreSchedulerService.java:72) [na:na]
              at co.cask.cdap.scheduler.CoreSchedulerService$1$1.startUp(CoreSchedulerService.java:108) [na:na]
              at com.google.common.util.concurrent.AbstractIdleService$1$1.run(AbstractIdleService.java:43) [com.google.guava.guava-13.0.1.jar:na]
              at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]
      Caused by: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1
              at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:176) ~[com.google.code.gson.gson-2.2.4.jar:na]
              at com.google.gson.Gson.fromJson(Gson.java:803) ~[com.google.code.gson.gson-2.2.4.jar:na]
              at com.google.gson.Gson.fromJson(Gson.java:768) ~[com.google.code.gson.gson-2.2.4.jar:na]
              at com.google.gson.Gson.fromJson(Gson.java:717) ~[com.google.code.gson.gson-2.2.4.jar:na]
              at com.google.gson.Gson.fromJson(Gson.java:689) ~[com.google.code.gson.gson-2.2.4.jar:na]
              at co.cask.cdap.internal.app.runtime.schedule.queue.JobQueueDataset.fromRow(JobQueueDataset.java:263) ~[na:na]
              at co.cask.cdap.internal.app.runtime.schedule.queue.JobQueueDataset.access$000(JobQueueDataset.java:64) ~[na:na]
              at co.cask.cdap.internal.app.runtime.schedule.queue.JobQueueDataset$1.computeNext(JobQueueDataset.java:251) ~[na:na]
              at co.cask.cdap.internal.app.runtime.schedule.queue.JobQueueDataset$1.computeNext(JobQueueDataset.java:244) ~[na:na]
              at co.cask.cdap.api.dataset.lib.AbstractCloseableIterator.tryToComputeNext(AbstractCloseableIterator.java:109) ~[na:na]
              at co.cask.cdap.api.dataset.lib.AbstractCloseableIterator.hasNext(AbstractCloseableIterator.java:104) ~[na:na]
              at co.cask.cdap.scheduler.CoreSchedulerService$2.run(CoreSchedulerService.java:136) ~[na:na]
              at co.cask.cdap.data2.transaction.Transactions$CacheBasedTransactional.finishExecute(Transactions.java:235) ~[na:na]
              ... 8 common frames omitted
      Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1
              at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:374) ~[com.google.code.gson.gson-2.2.4.jar:na]
              at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:165) ~[com.google.code.gson.gson-2.2.4.jar:na]
              ... 20 common frames omitted
      

        Attachments

          Activity

            People

            • Assignee:
              ali.anwar Ali Anwar
              Reporter:
              ali.anwar Ali Anwar
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: