Uploaded image for project: 'CarbonData'
  1. CarbonData
  2. CARBONDATA-2961

Simplify SDK API interfaces

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.5.0
    • None
    • None

    Description

      CARBONDATA-2961 Simplify SDK API interfaces

      problem: current SDK API interfaces are not simpler and don't follow builder pattern.
      If new features are added, it will become more complex.

      Solution: Simplify the SDK interfaces as per builder pattern.

      Refer the latest sdk-guide.

      Added:

      changes in Carbon Writer:
      public CarbonWriterBuilder withThreadSafe(short numOfThreads)
      public CarbonWriterBuilder withHadoopConf(Configuration conf)

      public CarbonWriterBuilder withCsvInput(Schema schema)
      public CarbonWriterBuilder withAvroInput(org.apache.avro.Schema avroSchema)
      public CarbonWriterBuilder withJsonInput(Schema carbonSchema)

      public CarbonWriter build() throws IOException, InvalidLoadOptionException

      Changes in carbon Reader
      public CarbonReaderBuilder withHadoopConf(Configuration conf)
      public CarbonWriter build() throws IOException, InvalidLoadOptionException

      Removed:

      changes in Carbon Writer:
      public CarbonWriterBuilder isTransactionalTable(boolean isTransactionalTable)

      public CarbonWriterBuilder persistSchemaFile(boolean persist);

      setAccessKey
      setAccessKey
      setSecretKey
      setSecretKey
      setEndPoint
      setEndPoint

      public CarbonWriter buildWriterForCSVInput(Schema schema, Configuration configuration)
      public CarbonWriter buildThreadSafeWriterForCSVInput(Schema schema, short numOfThreads,Configuration configuration)
      public CarbonWriter buildWriterForAvroInput(org.apache.avro.Schema avroSchema,Configuration configuration)
      public CarbonWriter buildThreadSafeWriterForAvroInput(org.apache.avro.Schema avroSchema,short numOfThreads, Configuration configuration)
      public JsonCarbonWriter buildWriterForJsonInput(Schema carbonSchema, Configuration configuration)
      public JsonCarbonWriter buildThreadSafeWriterForJsonInput(Schema carbonSchema, short numOfThreads,Configuration configuration)

      Changes in carbon Reader
      public CarbonReaderBuilder isTransactionalTable(boolean isTransactionalTable)
      public CarbonWriter build(Configuration conf) throws IOException, InvalidLoadOptionException

      Attachments

        Issue Links

          Activity

            People

              Ajantha_Bhat Ajantha Bhat
              Ajantha_Bhat Ajantha Bhat
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 5h 50m
                  5h 50m