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

Document how to create dataset with properties better

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.1.0, 3.0.1, 3.0.0
    • Fix Version/s: 3.1.0
    • Component/s: CLI
    • Labels:
      None
    • Rank:
      1|hzyvkn:

      Description

      I am trying to create a dataset with properties. the help states:

        create dataset instance <dataset-type> <new-dataset-name> [<dataset-properties>]
          Creates a Dataset.
      

      So I am trying:

      cdap (http://anew1874-1000.dev.continuuity.net:10000/default)> create dataset instance co.cask.cdap.api.dataset.lib.FileSet lines {"data.external":"true", "base.path":"/tmp/lines", "input.fomat":"org.apache.hadoop.mapreduce.lib.input.TextInputFormat"}
      Error: Expected format: create dataset instance <dataset-type> <new-dataset-name> [<dataset-properties>]
      
      cdap (http://anew1874-1000.dev.continuuity.net:10000/default)> create dataset instance co.cask.cdap.api.dataset.lib.FileSet lines "{'data.external':'true', 'base.path":"/tmp/lines', 'input.fomat':'org.apache.hadoop.mapreduce.lib.input.TextInputFormat'}"
      Error: String index out of range: -1
      
      cdap (http://anew1874-1000.dev.continuuity.net:10000/default)> create dataset instance co.cask.cdap.api.dataset.lib.FileSet lines '{"data.external":"true", "base.path":"/tmp/lines", "input.fomat":"org.apache.hadoop.mapreduce.lib.input.TextInputFormat"}'
      Error: String index out of range: -1
      

      I may be using the wrong format, but I can't figure out what's correct.

      • The help text should specidy the format
      • The CLI should never throw "Error: String index out of range: -1"

        Attachments

          Activity

            People

            • Assignee:
              alvin Alvin Wang
              Reporter:
              andreas Andreas Neumann
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: