本文整理了Java中org.apache.accumulo.core.iterators.Filter.validateOptions()
方法的一些代码示例,展示了Filter.validateOptions()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Filter.validateOptions()
方法的具体详情如下:
包路径:org.apache.accumulo.core.iterators.Filter
类名称:Filter
方法名:validateOptions
暂无
代码示例来源:origin: apache/accumulo
@Override
public boolean validateOptions(Map<String,String> options) {
if (!super.validateOptions(options))
return false;
try {
Long.parseLong(options.get(TTL));
} catch (Exception e) {
throw new IllegalArgumentException("bad long " + TTL + ":" + options.get(TTL));
}
return true;
}
代码示例来源:origin: apache/accumulo
@Override
public boolean validateOptions(Map<String,String> options) {
if (!super.validateOptions(options))
return false;
try {
this.ttls = new TTLSet(options);
} catch (Exception e) {
throw new IllegalArgumentException("bad TTL options", e);
}
return true;
}
代码示例来源:origin: apache/accumulo
@Override
public boolean validateOptions(Map<String,String> options) {
if (!super.validateOptions(options))
return false;
try {
if (options.containsKey(ROW_REGEX))
Pattern.compile(options.get(ROW_REGEX)).matcher("");
if (options.containsKey(COLF_REGEX))
Pattern.compile(options.get(COLF_REGEX)).matcher("");
if (options.containsKey(COLQ_REGEX))
Pattern.compile(options.get(COLQ_REGEX)).matcher("");
if (options.containsKey(VALUE_REGEX))
Pattern.compile(options.get(VALUE_REGEX)).matcher("");
} catch (Exception e) {
throw new IllegalArgumentException("bad regex", e);
}
if (options.containsKey(ENCODING)) {
try {
String encodingOpt = options.get(ENCODING);
this.encoding = Charset.forName(encodingOpt.isEmpty() ? ENCODING_DEFAULT : encodingOpt);
} catch (UnsupportedCharsetException e) {
throw new IllegalArgumentException("invalid encoding " + ENCODING + ":" + this.encoding, e);
}
}
return true;
}
代码示例来源:origin: apache/accumulo
@Override
public boolean validateOptions(Map<String,String> options) {
if (!super.validateOptions(options))
return false;
boolean hasStart = false;
代码示例来源:origin: NationalSecurityAgency/timely
@Override
public boolean validateOptions(Map<String, String> options) {
if (null == options.get(MetricAgeOffFilter.AGE_OFF_PREFIX + DEFAULT_AGEOFF_KEY)) {
throw new IllegalArgumentException(DEFAULT_AGEOFF_KEY + " must be configured for MetricAgeOffFilter");
}
return super.validateOptions(options);
}
代码示例来源:origin: NationalSecurityAgency/datawave
@Override
public boolean validateOptions(Map<String,String> options) {
boolean valid = super.validateOptions(options);
if (valid) {
try {
Integer.parseInt(options.get("ttl"));
} catch (Exception e) {
valid = false;
}
}
return valid;
}
代码示例来源:origin: Accla/graphulo
@Override
public boolean validateOptions(Map<String, String> options) {
if (!options.containsKey(PROBABILITY))
throw new IllegalArgumentException(PROBABILITY+" is a required option");
//noinspection ResultOfMethodCallIgnored
Double.parseDouble(options.get(PROBABILITY));
return super.validateOptions(options);
}
}
代码示例来源:origin: org.apache.accumulo/accumulo-core
@Override
public boolean validateOptions(Map<String,String> options) {
if (super.validateOptions(options) == false)
return false;
try {
Long.parseLong(options.get(TTL));
} catch (Exception e) {
throw new IllegalArgumentException("bad long " + TTL + ":" + options.get(TTL));
}
return true;
}
代码示例来源:origin: uk.gov.gchq.gaffer/accumulo-store
@Override
public boolean validateOptions(final Map<String, String> options) {
if (!super.validateOptions(options)) {
return false;
}
if (!options.containsKey(AccumuloStoreConstants.ACCUMULO_ELEMENT_CONVERTER_CLASS)) {
throw new IllegalArgumentException("Must specify the " + AccumuloStoreConstants.ACCUMULO_ELEMENT_CONVERTER_CLASS);
}
if (!options.containsKey(AccumuloStoreConstants.SCHEMA)) {
throw new IllegalArgumentException("Must specify the " + AccumuloStoreConstants.SCHEMA);
}
return true;
}
代码示例来源:origin: NationalSecurityAgency/datawave
@Override
public boolean validateOptions(Map<String,String> options) {
return (super.validateOptions(options) && options.containsKey(DATA_TYPE_OPT) && !StringUtils.isEmpty(options.get(DATA_TYPE_OPT))
&& options.containsKey(EVENT_UID_OPT) && !StringUtils.isEmpty(options.get(EVENT_UID_OPT)));
}
}
代码示例来源:origin: org.apache.accumulo/accumulo-core
@Override
public boolean validateOptions(Map<String,String> options) {
if (super.validateOptions(options) == false)
return false;
try {
this.ttls = new TTLSet(options);
} catch (Exception e) {
throw new IllegalArgumentException("bad TTL options", e);
}
return true;
}
代码示例来源:origin: uk.gov.gchq.gaffer/accumulo-store
@Override
public boolean validateOptions(final Map<String, String> options) {
if (!super.validateOptions(options)) {
return false;
}
if (options.containsKey(AccumuloStoreConstants.DIRECTED_EDGE_ONLY) && options.containsKey(AccumuloStoreConstants.UNDIRECTED_EDGE_ONLY)) {
throw new IllegalArgumentException("Must specify ONLY ONE of " + AccumuloStoreConstants.DIRECTED_EDGE_ONLY + " or "
+ AccumuloStoreConstants.UNDIRECTED_EDGE_ONLY);
}
if (options.containsKey(AccumuloStoreConstants.INCOMING_EDGE_ONLY) && options.containsKey(AccumuloStoreConstants.OUTGOING_EDGE_ONLY)) {
throw new IllegalArgumentException(
"Must specify ONLY ONE of " + AccumuloStoreConstants.INCOMING_EDGE_ONLY + " or " + AccumuloStoreConstants.OUTGOING_EDGE_ONLY);
}
return true;
}
代码示例来源:origin: uk.gov.gchq.gaffer/accumulo-store
@Override
public boolean validateOptions(final Map<String, String> options) {
if (!super.validateOptions(options)) {
return false;
}
if (options.containsKey(AccumuloStoreConstants.DIRECTED_EDGE_ONLY) && options.containsKey(AccumuloStoreConstants.UNDIRECTED_EDGE_ONLY)) {
throw new IllegalArgumentException("Must specify ONLY ONE of " + AccumuloStoreConstants.DIRECTED_EDGE_ONLY + " or "
+ AccumuloStoreConstants.UNDIRECTED_EDGE_ONLY);
}
if (options.containsKey(AccumuloStoreConstants.INCOMING_EDGE_ONLY) && options.containsKey(AccumuloStoreConstants.OUTGOING_EDGE_ONLY)) {
throw new IllegalArgumentException(
"Must specify ONLY ONE of " + AccumuloStoreConstants.INCOMING_EDGE_ONLY + " or " + AccumuloStoreConstants.OUTGOING_EDGE_ONLY);
}
return true;
}
代码示例来源:origin: Accla/graphulo
@Override
public boolean validateOptions(Map<String, String> options) {
if (options.containsKey(TRIANGULAR_TYPE)) {
TriangularType.valueOf(options.get(TRIANGULAR_TYPE));
}
return super.validateOptions(options);
}
代码示例来源:origin: uk.gov.gchq.gaffer/accumulo-store
@Override
public boolean validateOptions(final Map<String, String> options) {
if (!super.validateOptions(options)) {
return false;
}
if (!options.containsKey(AccumuloStoreConstants.BLOOM_FILTER)) {
throw new BloomFilterIteratorException("Must set the " + AccumuloStoreConstants.BLOOM_FILTER + " option");
}
return true;
}
代码示例来源:origin: Accla/graphulo
@Override
public boolean validateOptions(Map<String, String> options) {
if (options.containsKey(TRIANGULAR_TYPE)) {
TriangularType.valueOf(options.get(TRIANGULAR_TYPE));
}
return super.validateOptions(options);
}
代码示例来源:origin: org.apache.accumulo/accumulo-core
@Override
public boolean validateOptions(Map<String,String> options) {
if (super.validateOptions(options) == false)
return false;
try {
if (options.containsKey(ROW_REGEX))
Pattern.compile(options.get(ROW_REGEX)).matcher("");
if (options.containsKey(COLF_REGEX))
Pattern.compile(options.get(COLF_REGEX)).matcher("");
if (options.containsKey(COLQ_REGEX))
Pattern.compile(options.get(COLQ_REGEX)).matcher("");
if (options.containsKey(VALUE_REGEX))
Pattern.compile(options.get(VALUE_REGEX)).matcher("");
} catch (Exception e) {
throw new IllegalArgumentException("bad regex", e);
}
if (options.containsKey(ENCODING)) {
try {
String encodingOpt = options.get(ENCODING);
this.encoding = Charset.forName(encodingOpt.isEmpty() ? ENCODING_DEFAULT : encodingOpt);
} catch (UnsupportedCharsetException e) {
throw new IllegalArgumentException("invalid encoding " + ENCODING + ":" + this.encoding, e);
}
}
return true;
}
代码示例来源:origin: Accla/graphulo
@Override
public boolean validateOptions(Map<String, String> options) {
new MinMaxFilter().handleOptions(options);
return super.validateOptions(options);
}
}
代码示例来源:origin: org.apache.accumulo/accumulo-core
@Override
public boolean validateOptions(Map<String,String> options) {
if (super.validateOptions(options) == false)
return false;
boolean hasStart = false;
内容来源于网络,如有侵权,请联系作者删除!