use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project flink by apache.
the class TemporalTableSourceSpec method getTemporalTable.
@JsonIgnore
public RelOptTable getTemporalTable(FlinkContext flinkContext) {
if (null != temporalTable) {
return temporalTable;
}
if (null != tableSourceSpec && null != outputType) {
LookupTableSource lookupTableSource = tableSourceSpec.getLookupTableSource(flinkContext);
SourceAbilitySpec[] sourceAbilitySpecs = null;
if (null != tableSourceSpec.getSourceAbilities()) {
sourceAbilitySpecs = tableSourceSpec.getSourceAbilities().toArray(new SourceAbilitySpec[0]);
}
return new TableSourceTable(null, outputType, FlinkStatistic.UNKNOWN(), lookupTableSource, true, tableSourceSpec.getContextResolvedTable(), flinkContext, sourceAbilitySpecs);
}
throw new TableException("Can not obtain temporalTable correctly!");
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project hbase by apache.
the class TableSchemaModel method getTableDescriptor.
/**
* @return a table descriptor
*/
@JsonIgnore
public TableDescriptor getTableDescriptor() {
TableDescriptorBuilder tableDescriptorBuilder = TableDescriptorBuilder.newBuilder(TableName.valueOf(getName()));
for (Map.Entry<QName, Object> e : getAny().entrySet()) {
tableDescriptorBuilder.setValue(e.getKey().getLocalPart(), e.getValue().toString());
}
for (ColumnSchemaModel column : getColumns()) {
ColumnFamilyDescriptorBuilder cfdb = ColumnFamilyDescriptorBuilder.newBuilder(Bytes.toBytes(column.getName()));
for (Map.Entry<QName, Object> e : column.getAny().entrySet()) {
cfdb.setValue(e.getKey().getLocalPart(), e.getValue().toString());
}
tableDescriptorBuilder.setColumnFamily(cfdb.build());
}
return tableDescriptorBuilder.build();
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project XRTB by benmfaul.
the class WinObject method getJson.
/**
* The worker method for converting a WIN http target into a win
* notification in the bidder.
*
* @param target
* String. The HTTP url that makes up the win notification from
* the exchange.
* @return String. The ADM field to be used by exchange serving up the data.
* @throws Exception
* on REDIS errors.
*/
@JsonIgnore
public static String getJson(String target) throws Exception {
String image = null;
String[] parts = target.split("http");
String forward = "http:" + parts[1];
if (parts.length > 2)
image = "http:" + parts[2];
parts = parts[1].split("/");
String pubId = parts[5];
String price = parts[6];
String lat = parts[7];
String lon = parts[8];
String adId = parts[9];
String cridId = parts[10];
String hash = parts[11];
hash = hash.replaceAll("%23", "#");
if (image != null)
image = decoder.decode(image, "UTF-8");
forward = decoder.decode(forward, "UTF-8");
String cost = "";
/*
* This is synthetic, because in reality, adx has no win notification,
* this is a fake pixel fire that does the work
*/
if (pubId.equals(AdxBidRequest.ADX)) {
Long value = AdxWinObject.decrypt(price, System.currentTimeMillis());
Double dv = new Double(value);
dv /= 1000000;
price = dv.toString();
convertBidToWin(hash, cost, lat, lon, adId, cridId, pubId, image, forward, dv.toString(), pubId);
BidRequest.incrementWins(pubId);
return "";
}
if (pubId.equals(OpenRTB.GOOGLE)) {
Double dv = GoogleWinObject.decrypt(price, System.currentTimeMillis());
dv /= 1000;
price = dv.toString();
convertBidToWin(hash, cost, lat, lon, adId, cridId, pubId, image, forward, dv.toString(), pubId);
BidRequest.incrementWins(pubId);
return "";
}
Map bid = null;
try {
bid = Controller.getInstance().getBidData(hash);
} catch (Exception error) {
AerospikeHandler.reset();
return "";
}
// if (bid == null || bid.isEmpty()) {
// throw new Exception("No bid to convert to win: " + hash);
// }
String adm = null;
try {
adm = (String) bid.get("ADM");
cost = (String) bid.get("PRICE");
} catch (Exception error) {
// System.out.println("-----------> " + bid);
}
// the accounting works. just return ""
try {
convertBidToWin(hash, cost, lat, lon, adId, cridId, pubId, image, forward, price, adm);
} catch (Exception error) {
logger.error("Error: {}, target: {}", error.toString(), target);
}
BidRequest.incrementWins(pubId);
if (adm == null) {
return "";
}
return adm;
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project OpenRefine by OpenRefine.
the class ImportingJob method getSelectedFileRecords.
@JsonIgnore
public List<ObjectNode> getSelectedFileRecords() {
List<ObjectNode> results = new ArrayList<ObjectNode>();
ObjectNode retrievalRecord = JSONUtilities.getObject(config, "retrievalRecord");
if (retrievalRecord != null) {
ArrayNode fileRecordArray = JSONUtilities.getArray(retrievalRecord, "files");
if (fileRecordArray != null) {
ArrayNode fileSelectionArray = JSONUtilities.getArray(config, "fileSelection");
if (fileSelectionArray != null) {
for (int i = 0; i < fileSelectionArray.size(); i++) {
int index = JSONUtilities.getIntElement(fileSelectionArray, i, -1);
if (index >= 0 && index < fileRecordArray.size()) {
results.add(JSONUtilities.getObjectElement(fileRecordArray, index));
}
}
}
}
}
return results;
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project MantaroBot by Mantaro.
the class DBGuild method generateAndApplyPremiumKey.
@JsonIgnore
public PremiumKey generateAndApplyPremiumKey(int days) {
String premiumId = UUID.randomUUID().toString();
PremiumKey newKey = new PremiumKey(premiumId, TimeUnit.DAYS.toMillis(days), currentTimeMillis() + TimeUnit.DAYS.toMillis(days), PremiumKey.Type.GUILD, true, id, new PremiumKeyData());
data.setPremiumKey(premiumId);
newKey.saveAsync();
saveAsync();
return newKey;
}
Aggregations