Commit 47167485 authored by Federico Mestrone's avatar Federico Mestrone
Browse files

Changed type of Site, App and Device fields to String

parent dd97c6dc
package gcp.cm.bigdata.adtech;
import gcp.cm.bigdata.adtech.domain.Impression;
import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RestTemplate;
import java.io.*;
import java.util.InputMismatchException;
......@@ -30,15 +28,15 @@ public class IngesterMain {
entry.setHour(14103100);
entry.setC1(1005);
entry.setBannerPos(0);
entry.setSiteId(235);
entry.setSiteDomain(628);
entry.setSiteCategory(28772);
entry.setAppId(2386);
entry.setAppDomain(780189);
entry.setAppCategory(7722);
entry.setDeviceId(99214);
entry.setDeviceIp(6945779);
entry.setDeviceModel(711);
entry.setSiteId("235");
entry.setSiteDomain("628");
entry.setSiteCategory("28772");
entry.setAppId("2386");
entry.setAppDomain("780189");
entry.setAppCategory("7722");
entry.setDeviceId("99214");
entry.setDeviceIp("6945779");
entry.setDeviceModel("711");
entry.setDeviceType(1);
entry.setDeviceConnType(0);
entry.setC14(1005);
......@@ -78,15 +76,15 @@ public class IngesterMain {
entry.setHour(scanner.nextInt());
entry.setC1(scanner.nextInt());
entry.setBannerPos(scanner.nextInt());
entry.setSiteId(nextIntOrRandom(scanner, 100));
entry.setSiteDomain(nextIntOrRandom(scanner, 100));
entry.setSiteCategory(nextIntOrRandom(scanner, 50));
entry.setAppId(nextIntOrRandom(scanner, 500));
entry.setAppDomain(nextIntOrRandom(scanner, 300));
entry.setAppCategory(nextIntOrRandom(scanner, 50));
entry.setDeviceId(nextIntOrRandom(scanner, 5000));
entry.setDeviceIp(nextIntOrRandom(scanner, 5000));
entry.setDeviceModel(nextIntOrRandom(scanner, 300));
entry.setSiteId(scanner.next());
entry.setSiteDomain(scanner.next());
entry.setSiteCategory(scanner.next());
entry.setAppId(scanner.next());
entry.setAppDomain(scanner.next());
entry.setAppCategory(scanner.next());
entry.setDeviceId(scanner.next());
entry.setDeviceIp(scanner.next());
entry.setDeviceModel(scanner.next());
entry.setDeviceType(scanner.nextInt());
entry.setDeviceConnType(scanner.nextInt());
entry.setC14(scanner.nextInt());
......
......@@ -12,15 +12,15 @@ public class Impression {
private int clicked;
@Index private int hour;
private int bannerPos;
private int siteId;
private int siteDomain;
@Index private int siteCategory;
private int appId;
private int appDomain;
@Index private int appCategory;
private int deviceId;
private int deviceIp;
private int deviceModel;
private String siteId;
private String siteDomain;
@Index private String siteCategory;
private String appId;
private String appDomain;
@Index private String appCategory;
private String deviceId;
private String deviceIp;
private String deviceModel;
@Index private int deviceType;
private int deviceConnType;
private int c1;
......@@ -65,75 +65,75 @@ public class Impression {
this.bannerPos = bannerPos;
}
public int getSiteId() {
public String getSiteId() {
return siteId;
}
public void setSiteId(int siteId) {
public void setSiteId(String siteId) {
this.siteId = siteId;
}
public int getSiteDomain() {
public String getSiteDomain() {
return siteDomain;
}
public void setSiteDomain(int siteDomain) {
public void setSiteDomain(String siteDomain) {
this.siteDomain = siteDomain;
}
public int getSiteCategory() {
public String getSiteCategory() {
return siteCategory;
}
public void setSiteCategory(int siteCategory) {
public void setSiteCategory(String siteCategory) {
this.siteCategory = siteCategory;
}
public int getAppId() {
public String getAppId() {
return appId;
}
public void setAppId(int appId) {
public void setAppId(String appId) {
this.appId = appId;
}
public int getAppDomain() {
public String getAppDomain() {
return appDomain;
}
public void setAppDomain(int appDomain) {
public void setAppDomain(String appDomain) {
this.appDomain = appDomain;
}
public int getAppCategory() {
public String getAppCategory() {
return appCategory;
}
public void setAppCategory(int appCategory) {
public void setAppCategory(String appCategory) {
this.appCategory = appCategory;
}
public int getDeviceId() {
public String getDeviceId() {
return deviceId;
}
public void setDeviceId(int deviceId) {
public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
}
public int getDeviceIp() {
public String getDeviceIp() {
return deviceIp;
}
public void setDeviceIp(int deviceIp) {
public void setDeviceIp(String deviceIp) {
this.deviceIp = deviceIp;
}
public int getDeviceModel() {
public String getDeviceModel() {
return deviceModel;
}
public void setDeviceModel(int deviceModel) {
public void setDeviceModel(String deviceModel) {
this.deviceModel = deviceModel;
}
......
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