Hi Val,
the class is listed below. Two more updates:
* The "Ignoring entry for partition ..." is also present on the slow cluster,
where the data is loaded correctly.
* The clocks are significantly out of sync on the fast cluster. One is off by
more than one minute. I am having this rectified, but it is not my cluster, so
it is taking some time.
Here is the key class.
import java.io.Serializable;
import java.util.UUID;
import java.util.Date;
public class FcPortStatsKey implements Serializable {
private Date hour; // partition 1 -- timestamp truncated at the
hour
private Integer bucket; // partition 2 -- switch_id hashed to buckets
private Date dateTime; // cluster 1 -- date_time
private UUID portId; // cluster 2 -- port_id
// default constructor
public FcPortStatsKey() {
super();
}
public Date getHour() { return hour; }
public Integer getBucket() { return bucket; }
public Date getDateTime() { return dateTime; }
public UUID getPortId() { return portId; }
public void setHour( Date hour) { this.hour = hour; }
public void setBucket( Integer bucket) { this.bucket = bucket; }
public void setDateTime( Date dateTime) { this.dateTime = dateTime; }
public void setPortId( UUID portId) { this.portId = portId; }
@Override
public String toString() {
return String.format( "FcPortStatsKey: %s, %d, %s, %s",
hour.toString(), bucket, dateTime.toString(), portId.toString());
}
@Override
public boolean equals( Object obj) {
if (this == obj) return true;
if (!(obj instanceof FcPortStatsKey)) return false;
FcPortStatsKey other = (FcPortStatsKey) obj;
// partition keys are derived; need not be included
if (dateTime != null && dateTime.equals( other.dateTime) &&
portId != null && portId.equals( other.portId))
return true;
else
return false;
}
@Override
public int hashCode() {
// partition keys are derived; need not be included
int result = 91;
result = 127 * result + portId.hashCode();
result = 127 * result + dateTime.hashCode();
return result;
}
}
And here is the related configuration:
<persistence keyspace="test_11" table="fc_port_stats">
<keyPersistence
class="com.brocade.poc.icpoc.model.FcPortStatsKey" strategy="POJO">
<partitionKey>
<field name="hour"/>
<field name="bucket"/>
</partitionKey>
<clusterKey>
<field name="dateTime" column="date_time"/>
<field name="portId" column="port_id"/>
</clusterKey>
</keyPersistence>
Roger
-----Original Message-----
From: vkulichenko [mailto:[email protected]]
Sent: Tuesday, July 25, 2017 5:16 PM
To: [email protected]
Subject: Re: Missing object when loading from Cassandra with multiple queries
Hi Roger,
Can you show the FcPortStatsKey class?
-Val
--
View this message in context:
https://urldefense.proofpoint.com/v2/url?u=http-3A__apache-2Dignite-2Dusers.70518.x6.nabble.com_Missing-2Dobject-2Dwhen-2Dloading-2Dfrom-2DCassandra-2Dwith-2Dmultiple-2Dqueries-2Dtp15644p15645.html&d=DwICAg&c=IL_XqQWOjubgfqINi2jTzg&r=1esZO0r0bYS90lcsaLA6N4AFxuNo6lzauhETGwdJQoQ&m=s1zSUsG_hFKhGsE9HpBCQWzuPCJa-iX4tmT8kmN7-d0&s=u8-EePeYS6JZ8u9cp9pMGJ8WGAoSvDZFBy93_jKNrIM&e=
Sent from the Apache Ignite Users mailing list archive at Nabble.com.