Commit 4c4549a4 authored by Federico Mestrone's avatar Federico Mestrone
Browse files

Fixed bug with BigTable row key

The key did not allow each impression to be seen as different to the others, so we would end up with only about 20 rows
parent 176dcde6
......@@ -44,7 +44,7 @@ public class BigtableHelper {
Table table = null;
try {
table = BigtableHelper.getConnection().getTable(TableName.valueOf("impressions"));
Put p = new Put(Bytes.toBytes(String.format("%s#%s#%d#%d", entry.getSiteCategory(), entry.getAppCategory(), entry.getDeviceType(), entry.getHour())));
Put p = new Put(Bytes.toBytes(String.format("%s#%s#%d#%s", entry.getSiteCategory(), entry.getAppCategory(), entry.getDeviceType(), entry.getImpressionId())));
p.addColumn(CF1, Bytes.toBytes("ID"), Bytes.toBytes(entry.getImpressionId()));
p.addColumn(CF1, Bytes.toBytes("CLICK"), Bytes.toBytes(entry.getClicked()));
p.addColumn(CF1, Bytes.toBytes("HOUR"), Bytes.toBytes(entry.getHour()));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment