Re: storm-hive not updating table record when table has a primary key

2017-07-16 Thread Federico D'Ambrosio
I realized that this issue is related to Hive, since as of Hive2, it
doesn't support yet uniqueness of keys. This feature is however listed as
being available in Hive 3 (
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310843=12340268).


So, being this feature not available, is there any way to check this
constraint in the storm topology? Using an ad-hoc HiveUpdater or HiveState?

2017-07-16 17:46 GMT+02:00 Federico D'Ambrosio <
federico.dambro...@smartlab.ws>:

> Hi,
>
> I have a Trident Storm topology which ingest data from a Kafka Spout to an
> Hive table. This table is set with a primary key, an id I generate. Now,
> shouldn't the presence of a primary key
> guarantee of an update transaction, rather than an insert?
>
> For example, in my table there's a row:
>
> |id|origin|timestamp|
> | 2| "LAX"| 15 |
>
> then, new data comes in and I get
>
> |id|origin|timestamp|
> ---
> | 2| "LAX"| 15 |
> | 2| "LAX"| 150150 |
>
> I'm wondering if I'm missing something about the ACID support of Hive, and
> its implementation in storm-hive, or rather I'm just getting the expected
> result.
>
> Thanks for your attention,
> Federico
>


storm-hive not updating table record when table has a primary key

2017-07-16 Thread Federico D'Ambrosio
Hi,

I have a Trident Storm topology which ingest data from a Kafka Spout to an
Hive table. This table is set with a primary key, an id I generate. Now,
shouldn't the presence of a primary key
guarantee of an update transaction, rather than an insert?

For example, in my table there's a row:

|id|origin|timestamp|
| 2| "LAX"| 15 |

then, new data comes in and I get

|id|origin|timestamp|
---
| 2| "LAX"| 15 |
| 2| "LAX"| 150150 |

I'm wondering if I'm missing something about the ACID support of Hive, and
its implementation in storm-hive, or rather I'm just getting the expected
result.

Thanks for your attention,
Federico