How is the internal working of this api : druid/indexer/v1/task?

I wanted to understand is it possible to launch the Map reduce job using this api on a dataproc cluster. I want to keep the “type” as “index_hadoop”
If it is possible then , how do we process it . Please help.

This Hadoop-based ingestion reference doc might get you started. You can see a sample task where the type is index_hadoop:

{
  "type" : "index_hadoop",
  "spec" : {
    "dataSchema" : {
      "dataSource" : "wikipedia",
      "parser" : {
        "type" : "hadoopyString",
        "parseSpec" : {
          "format" : "json",
          "timestampSpec" : {
            "column" : "timestamp",
            "format" : "auto"
          },
          "dimensionsSpec" : {
            "dimensions": ["page","language","user","unpatrolled","newPage","robot","anonymous","namespace","continent","country","region","city"],
            "dimensionExclusions" : [],
            "spatialDimensions" : []
          }
        }
      },
      "metricsSpec" : [
        {
          "type" : "count",
          "name" : "count"
        },
        {
          "type" : "doubleSum",
          "name" : "added",
          "fieldName" : "added"
        },
        {
          "type" : "doubleSum",
          "name" : "deleted",
          "fieldName" : "deleted"
        },
        {
          "type" : "doubleSum",
          "name" : "delta",
          "fieldName" : "delta"
        }
      ],
      "granularitySpec" : {
        "type" : "uniform",
        "segmentGranularity" : "DAY",
        "queryGranularity" : "NONE",
        "intervals" : [ "2013-08-31/2013-09-01" ]
      }
    },
    "ioConfig" : {
      "type" : "hadoop",
      "inputSpec" : {
        "type" : "static",
        "paths" : "/MyDirectory/example/wikipedia_data.json"
      }
    },
    "tuningConfig" : {
      "type": "hadoop"
    }
  },
  "hadoopDependencyCoordinates": <my_hadoop_version>
}

Within the ioConfig you can specify an inputSpec with an inputFormat of org.apache.hadoop.mapreduce.lib.input.SequenceFileInputFormat.

I know the ingestion spec is possible , but how to we launch the underlying map reduce job on dataproc ?

Hi @Sakshi_Sharma, normally the job is submitted when the ingestion spec is submitted. Are you not seeing the job in dataproc after submitting the ingestion spec?
Perhaps this part of the docs can help shed some light: Hadoop-based ingestion · Apache Druid

The preferred way to do batch ingestion is using Native Batch Ingestion whenever you can.