kudu-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Devender Yadav <devender.ya...@impetus.co.in>
Subject Re: Fetch row on the basis of composite primary key from table using Java API
Date Wed, 15 Feb 2017 20:50:29 GMT
Thanks Todd for the prompt reply !?

________________________________
From: Todd Lipcon <todd@cloudera.com>
Sent: Wednesday, February 15, 2017 11:59 PM
To: user@kudu.apache.org
Subject: Re: Fetch row on the basis of composite primary key from table using Java API

Hi Devender,

Yes, that's right -- create an equality predicate for all three components of the key, and
the Kudu client will be smart enough to fetch just that one row from the server that hosts
it.

-Todd

On Wed, Feb 15, 2017 at 2:44 AM, Devender Yadav <devender.yadav@impetus.co.in<mailto:devender.yadav@impetus.co.in>>
wrote:

Hi All,


I am using Kudu Java API.



I have a table metrics.

CREATE TABLE metrics (
    host STRING NOT NULL,
    metric STRING NOT NULL,
    time INT64 NOT NULL,
    value DOUBLE NOT NULL,
    PRIMARY KEY (host, metric, time),
);


I need to fetch row on the basis of primary key from metrics table.


Do I need to create 3 comparison? predicates for all the primary key columns  KuduPredicate.newComparisonPredicate?()
?




Regards,
Devender

________________________________






NOTE: This message may contain information that is confidential, proprietary, privileged or
otherwise protected by law. The message is intended solely for the named addressee. If received
in error, please destroy and notify the sender. Any use of this email is prohibited when received
in error. Impetus does not represent, warrant and/or guarantee, that the integrity of this
communication has been maintained nor that the communication is free of errors, virus, interception
or interference.



--
Todd Lipcon
Software Engineer, Cloudera

________________________________






NOTE: This message may contain information that is confidential, proprietary, privileged or
otherwise protected by law. The message is intended solely for the named addressee. If received
in error, please destroy and notify the sender. Any use of this email is prohibited when received
in error. Impetus does not represent, warrant and/or guarantee, that the integrity of this
communication has been maintained nor that the communication is free of errors, virus, interception
or interference.

Mime
View raw message