hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesus Camacho Rodriguez (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-14472) Read results for Druid Select query
Date Tue, 16 Aug 2016 07:27:20 GMT

     [ https://issues.apache.org/jira/browse/HIVE-14472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jesus Camacho Rodriguez updated HIVE-14472:
-------------------------------------------
    Description: 
Format of results for Druid Select queries is as follows:

{code}
[{
  "timestamp" : "2013-01-01T00:00:00.000Z",
  "result" : {
    "pagingIdentifiers" : {
      "wikipedia_2012-12-29T00:00:00.000Z_2013-01-10T08:00:00.000Z_2013-01-10T08:13:47.830Z_v9"
: 4
    },
    "events" : [ {
      "segmentId" : "wikipedia_editstream_2012-12-29T00:00:00.000Z_2013-01-10T08:00:00.000Z_2013-01-10T08:13:47.830Z_v9",
      "offset" : 0,
      "event" : {
        "timestamp" : "2013-01-01T00:00:00.000Z",
        "robot" : "1",
        "namespace" : "article",
        "anonymous" : "0",
        "unpatrolled" : "0",
        "page" : "11._korpus_(NOVJ)",
        "language" : "sl",
        "newpage" : "0",
        "user" : "EmausBot",
        "count" : 1.0,
        "added" : 39.0,
        "delta" : 39.0,
        "variation" : 39.0,
        "deleted" : 0.0
      }
    }, {
      "segmentId" : "wikipedia_2012-12-29T00:00:00.000Z_2013-01-10T08:00:00.000Z_2013-01-10T08:13:47.830Z_v9",
      "offset" : 1,
      "event" : {
        "timestamp" : "2013-01-01T00:00:00.000Z",
        "robot" : "0",
        "namespace" : "article",
        "anonymous" : "0",
        "unpatrolled" : "0",
        "page" : "112_U.S._580",
        "language" : "en",
        "newpage" : "1",
        "user" : "MZMcBride",
        "count" : 1.0,
        "added" : 70.0,
        "delta" : 70.0,
        "variation" : 70.0,
        "deleted" : 0.0
      }
    }, {
      "segmentId" : "wikipedia_2012-12-29T00:00:00.000Z_2013-01-10T08:00:00.000Z_2013-01-10T08:13:47.830Z_v9",
      "offset" : 2,
      "event" : {
        "timestamp" : "2013-01-01T00:00:00.000Z",
        "robot" : "0",
        "namespace" : "article",
        "anonymous" : "0",
        "unpatrolled" : "0",
        "page" : "113_U.S._243",
        "language" : "en",
        "newpage" : "1",
        "user" : "MZMcBride",
        "count" : 1.0,
        "added" : 77.0,
        "delta" : 77.0,
        "variation" : 77.0,
        "deleted" : 0.0
      }
    }, {
      "segmentId" : "wikipedia_2012-12-29T00:00:00.000Z_2013-01-10T08:00:00.000Z_2013-01-10T08:13:47.830Z_v9",
      "offset" : 3,
      "event" : {
        "timestamp" : "2013-01-01T00:00:00.000Z",
        "robot" : "0",
        "namespace" : "article",
        "anonymous" : "0",
        "unpatrolled" : "0",
        "page" : "113_U.S._73",
        "language" : "en",
        "newpage" : "1",
        "user" : "MZMcBride",
        "count" : 1.0,
        "added" : 70.0,
        "delta" : 70.0,
        "variation" : 70.0,
        "deleted" : 0.0
      }
    }, {
      "segmentId" : "wikipedia_2012-12-29T00:00:00.000Z_2013-01-10T08:00:00.000Z_2013-01-10T08:13:47.830Z_v9",
      "offset" : 4,
      "event" : {
        "timestamp" : "2013-01-01T00:00:00.000Z",
        "robot" : "0",
        "namespace" : "article",
        "anonymous" : "0",
        "unpatrolled" : "0",
        "page" : "113_U.S._756",
        "language" : "en",
        "newpage" : "1",
        "user" : "MZMcBride",
        "count" : 1.0,
        "added" : 68.0,
        "delta" : 68.0,
        "variation" : 68.0,
        "deleted" : 0.0
      }
    } ]
  }
} ]
{code}

Out of this query results, we will generate Hive records with the following format:

{code}
[ new TimestampWritable(new Timestamp(1356998400000L)), new Text("1"), new Text("article"),
new Text("0"), new Text("0"), new Text("11._korpus_(NOVJ)"), new Text("sl"), new Text("0"),
new Text("EmausBot"), new FloatWritable(1.0F), new FloatWritable(39.0F), new FloatWritable(39.0F),
new FloatWritable(39.0F), new FloatWritable(0.0F) ]
[ new TimestampWritable(new Timestamp(1356998400000L)), new Text("0"), new Text("article"),
new Text("0"), new Text("0"), new Text("112_U.S._580"), new Text("en"), new Text("1"), new
Text("MZMcBride"), new FloatWritable(1.0F), new FloatWritable(70.0F), new FloatWritable(70.0F),
new FloatWritable(70.0F), new FloatWritable(0.0F) ]
[ new TimestampWritable(new Timestamp(1356998400000L)), new Text("0"), new Text("article"),
new Text("0"), new Text("0"), new Text("113_U.S._243"), new Text("en"), new Text("1"), new
Text("MZMcBride"), new FloatWritable(1.0F), new FloatWritable(77.0F), new FloatWritable(77.0F),
new FloatWritable(77.0F), new FloatWritable(0.0F) ]
[ new TimestampWritable(new Timestamp(1356998400000L)), new Text("0"), new Text("article"),
new Text("0"), new Text("0"), new Text("113_U.S._73"), new Text("en"), new Text("1"), new
Text("MZMcBride"), new FloatWritable(1.0F), new FloatWritable(70.0F), new FloatWritable(70.0F),
new FloatWritable(70.0F), new FloatWritable(0.0F) ]
[ new TimestampWritable(new Timestamp(1356998400000L)), new Text("0"), new Text("article"),
new Text("0"), new Text("0"), new Text("113_U.S._756"), new Text("en"), new Text("1"), new
Text("MZMcBride"), new FloatWritable(1.0F), new FloatWritable(68.0F), new FloatWritable(68.0F),
new FloatWritable(68.0F), new FloatWritable(0.0F) ]
{code}


  was:
Format of results for Druid Select queries is as follows:

{code}
[{
  "timestamp" : "2013-01-01T00:00:00.000Z",
  "result" : {
    "pagingIdentifiers" : {
      "wikipedia_2012-12-29T00:00:00.000Z_2013-01-10T08:00:00.000Z_2013-01-10T08:13:47.830Z_v9"
: 4
    },
    "events" : [ {
      "segmentId" : "wikipedia_editstream_2012-12-29T00:00:00.000Z_2013-01-10T08:00:00.000Z_2013-01-10T08:13:47.830Z_v9",
      "offset" : 0,
      "event" : {
        "timestamp" : "2013-01-01T00:00:00.000Z",
        "robot" : "1",
        "namespace" : "article",
        "anonymous" : "0",
        "unpatrolled" : "0",
        "page" : "11._korpus_(NOVJ)",
        "language" : "sl",
        "newpage" : "0",
        "user" : "EmausBot",
        "count" : 1.0,
        "added" : 39.0,
        "delta" : 39.0,
        "variation" : 39.0,
        "deleted" : 0.0
      }
    }, {
      "segmentId" : "wikipedia_2012-12-29T00:00:00.000Z_2013-01-10T08:00:00.000Z_2013-01-10T08:13:47.830Z_v9",
      "offset" : 1,
      "event" : {
        "timestamp" : "2013-01-01T00:00:00.000Z",
        "robot" : "0",
        "namespace" : "article",
        "anonymous" : "0",
        "unpatrolled" : "0",
        "page" : "112_U.S._580",
        "language" : "en",
        "newpage" : "1",
        "user" : "MZMcBride",
        "count" : 1.0,
        "added" : 70.0,
        "delta" : 70.0,
        "variation" : 70.0,
        "deleted" : 0.0
      }
    }, {
      "segmentId" : "wikipedia_2012-12-29T00:00:00.000Z_2013-01-10T08:00:00.000Z_2013-01-10T08:13:47.830Z_v9",
      "offset" : 2,
      "event" : {
        "timestamp" : "2013-01-01T00:00:00.000Z",
        "robot" : "0",
        "namespace" : "article",
        "anonymous" : "0",
        "unpatrolled" : "0",
        "page" : "113_U.S._243",
        "language" : "en",
        "newpage" : "1",
        "user" : "MZMcBride",
        "count" : 1.0,
        "added" : 77.0,
        "delta" : 77.0,
        "variation" : 77.0,
        "deleted" : 0.0
      }
    }, {
      "segmentId" : "wikipedia_2012-12-29T00:00:00.000Z_2013-01-10T08:00:00.000Z_2013-01-10T08:13:47.830Z_v9",
      "offset" : 3,
      "event" : {
        "timestamp" : "2013-01-01T00:00:00.000Z",
        "robot" : "0",
        "namespace" : "article",
        "anonymous" : "0",
        "unpatrolled" : "0",
        "page" : "113_U.S._73",
        "language" : "en",
        "newpage" : "1",
        "user" : "MZMcBride",
        "count" : 1.0,
        "added" : 70.0,
        "delta" : 70.0,
        "variation" : 70.0,
        "deleted" : 0.0
      }
    }, {
      "segmentId" : "wikipedia_2012-12-29T00:00:00.000Z_2013-01-10T08:00:00.000Z_2013-01-10T08:13:47.830Z_v9",
      "offset" : 4,
      "event" : {
        "timestamp" : "2013-01-01T00:00:00.000Z",
        "robot" : "0",
        "namespace" : "article",
        "anonymous" : "0",
        "unpatrolled" : "0",
        "page" : "113_U.S._756",
        "language" : "en",
        "newpage" : "1",
        "user" : "MZMcBride",
        "count" : 1.0,
        "added" : 68.0,
        "delta" : 68.0,
        "variation" : 68.0,
        "deleted" : 0.0
      }
    } ]
  }
} ]
{code}

Out of this query results, we will generate Hive records with the following format:

{code}
[ new LongWritable(1356998400000L), new Text("1"), new Text("article"), new Text("0"), new
Text("0"), new Text("11._korpus_(NOVJ)"), new Text("sl"), new Text("0"), new Text("EmausBot"),
new FloatWritable(1.0F), new FloatWritable(39.0F), new FloatWritable(39.0F), new FloatWritable(39.0F),
new FloatWritable(0.0F) ]
[ new LongWritable(1356998400000L), new Text("0"), new Text("article"), new Text("0"), new
Text("0"), new Text("112_U.S._580"), new Text("en"), new Text("1"), new Text("MZMcBride"),
new FloatWritable(1.0F), new FloatWritable(70.0F), new FloatWritable(70.0F), new FloatWritable(70.0F),
new FloatWritable(0.0F) ]
[ new LongWritable(1356998400000L), new Text("0"), new Text("article"), new Text("0"), new
Text("0"), new Text("113_U.S._243"), new Text("en"), new Text("1"), new Text("MZMcBride"),
new FloatWritable(1.0F), new FloatWritable(77.0F), new FloatWritable(77.0F), new FloatWritable(77.0F),
new FloatWritable(0.0F) ]
[ new LongWritable(1356998400000L), new Text("0"), new Text("article"), new Text("0"), new
Text("0"), new Text("113_U.S._73"), new Text("en"), new Text("1"), new Text("MZMcBride"),
new FloatWritable(1.0F), new FloatWritable(70.0F), new FloatWritable(70.0F), new FloatWritable(70.0F),
new FloatWritable(0.0F) ]
[ new LongWritable(1356998400000L), new Text("0"), new Text("article"), new Text("0"), new
Text("0"), new Text("113_U.S._756"), new Text("en"), new Text("1"), new Text("MZMcBride"),
new FloatWritable(1.0F), new FloatWritable(68.0F), new FloatWritable(68.0F), new FloatWritable(68.0F),
new FloatWritable(0.0F) ]
{code}



> Read results for Druid Select query
> -----------------------------------
>
>                 Key: HIVE-14472
>                 URL: https://issues.apache.org/jira/browse/HIVE-14472
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Druid integration
>    Affects Versions: 2.2.0
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>
> Format of results for Druid Select queries is as follows:
> {code}
> [{
>   "timestamp" : "2013-01-01T00:00:00.000Z",
>   "result" : {
>     "pagingIdentifiers" : {
>       "wikipedia_2012-12-29T00:00:00.000Z_2013-01-10T08:00:00.000Z_2013-01-10T08:13:47.830Z_v9"
: 4
>     },
>     "events" : [ {
>       "segmentId" : "wikipedia_editstream_2012-12-29T00:00:00.000Z_2013-01-10T08:00:00.000Z_2013-01-10T08:13:47.830Z_v9",
>       "offset" : 0,
>       "event" : {
>         "timestamp" : "2013-01-01T00:00:00.000Z",
>         "robot" : "1",
>         "namespace" : "article",
>         "anonymous" : "0",
>         "unpatrolled" : "0",
>         "page" : "11._korpus_(NOVJ)",
>         "language" : "sl",
>         "newpage" : "0",
>         "user" : "EmausBot",
>         "count" : 1.0,
>         "added" : 39.0,
>         "delta" : 39.0,
>         "variation" : 39.0,
>         "deleted" : 0.0
>       }
>     }, {
>       "segmentId" : "wikipedia_2012-12-29T00:00:00.000Z_2013-01-10T08:00:00.000Z_2013-01-10T08:13:47.830Z_v9",
>       "offset" : 1,
>       "event" : {
>         "timestamp" : "2013-01-01T00:00:00.000Z",
>         "robot" : "0",
>         "namespace" : "article",
>         "anonymous" : "0",
>         "unpatrolled" : "0",
>         "page" : "112_U.S._580",
>         "language" : "en",
>         "newpage" : "1",
>         "user" : "MZMcBride",
>         "count" : 1.0,
>         "added" : 70.0,
>         "delta" : 70.0,
>         "variation" : 70.0,
>         "deleted" : 0.0
>       }
>     }, {
>       "segmentId" : "wikipedia_2012-12-29T00:00:00.000Z_2013-01-10T08:00:00.000Z_2013-01-10T08:13:47.830Z_v9",
>       "offset" : 2,
>       "event" : {
>         "timestamp" : "2013-01-01T00:00:00.000Z",
>         "robot" : "0",
>         "namespace" : "article",
>         "anonymous" : "0",
>         "unpatrolled" : "0",
>         "page" : "113_U.S._243",
>         "language" : "en",
>         "newpage" : "1",
>         "user" : "MZMcBride",
>         "count" : 1.0,
>         "added" : 77.0,
>         "delta" : 77.0,
>         "variation" : 77.0,
>         "deleted" : 0.0
>       }
>     }, {
>       "segmentId" : "wikipedia_2012-12-29T00:00:00.000Z_2013-01-10T08:00:00.000Z_2013-01-10T08:13:47.830Z_v9",
>       "offset" : 3,
>       "event" : {
>         "timestamp" : "2013-01-01T00:00:00.000Z",
>         "robot" : "0",
>         "namespace" : "article",
>         "anonymous" : "0",
>         "unpatrolled" : "0",
>         "page" : "113_U.S._73",
>         "language" : "en",
>         "newpage" : "1",
>         "user" : "MZMcBride",
>         "count" : 1.0,
>         "added" : 70.0,
>         "delta" : 70.0,
>         "variation" : 70.0,
>         "deleted" : 0.0
>       }
>     }, {
>       "segmentId" : "wikipedia_2012-12-29T00:00:00.000Z_2013-01-10T08:00:00.000Z_2013-01-10T08:13:47.830Z_v9",
>       "offset" : 4,
>       "event" : {
>         "timestamp" : "2013-01-01T00:00:00.000Z",
>         "robot" : "0",
>         "namespace" : "article",
>         "anonymous" : "0",
>         "unpatrolled" : "0",
>         "page" : "113_U.S._756",
>         "language" : "en",
>         "newpage" : "1",
>         "user" : "MZMcBride",
>         "count" : 1.0,
>         "added" : 68.0,
>         "delta" : 68.0,
>         "variation" : 68.0,
>         "deleted" : 0.0
>       }
>     } ]
>   }
> } ]
> {code}
> Out of this query results, we will generate Hive records with the following format:
> {code}
> [ new TimestampWritable(new Timestamp(1356998400000L)), new Text("1"), new Text("article"),
new Text("0"), new Text("0"), new Text("11._korpus_(NOVJ)"), new Text("sl"), new Text("0"),
new Text("EmausBot"), new FloatWritable(1.0F), new FloatWritable(39.0F), new FloatWritable(39.0F),
new FloatWritable(39.0F), new FloatWritable(0.0F) ]
> [ new TimestampWritable(new Timestamp(1356998400000L)), new Text("0"), new Text("article"),
new Text("0"), new Text("0"), new Text("112_U.S._580"), new Text("en"), new Text("1"), new
Text("MZMcBride"), new FloatWritable(1.0F), new FloatWritable(70.0F), new FloatWritable(70.0F),
new FloatWritable(70.0F), new FloatWritable(0.0F) ]
> [ new TimestampWritable(new Timestamp(1356998400000L)), new Text("0"), new Text("article"),
new Text("0"), new Text("0"), new Text("113_U.S._243"), new Text("en"), new Text("1"), new
Text("MZMcBride"), new FloatWritable(1.0F), new FloatWritable(77.0F), new FloatWritable(77.0F),
new FloatWritable(77.0F), new FloatWritable(0.0F) ]
> [ new TimestampWritable(new Timestamp(1356998400000L)), new Text("0"), new Text("article"),
new Text("0"), new Text("0"), new Text("113_U.S._73"), new Text("en"), new Text("1"), new
Text("MZMcBride"), new FloatWritable(1.0F), new FloatWritable(70.0F), new FloatWritable(70.0F),
new FloatWritable(70.0F), new FloatWritable(0.0F) ]
> [ new TimestampWritable(new Timestamp(1356998400000L)), new Text("0"), new Text("article"),
new Text("0"), new Text("0"), new Text("113_U.S._756"), new Text("en"), new Text("1"), new
Text("MZMcBride"), new FloatWritable(1.0F), new FloatWritable(68.0F), new FloatWritable(68.0F),
new FloatWritable(68.0F), new FloatWritable(0.0F) ]
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message