if (result != 0 || part.equals(PartialKey.ROW)) return result; if (result != 0 || part.equals(PartialKey.ROW_COLFAM)) return result; if (result != 0 || part.equals(PartialKey.ROW_COLFAM_COLQUAL)) return result; if (result != 0 || part.equals(PartialKey.ROW_COLFAM_COLQUAL_COLVIS)) return result; result = 0; if (result != 0 || part.equals(PartialKey.ROW_COLFAM_COLQUAL_COLVIS_TIME)) return result;
private void parseOptions(Map<String,String> options) { for (Map.Entry<String, String> entry : options.entrySet()) { String v = entry.getValue(); switch (entry.getKey()) { case PARTIAL_KEY: if (v.isEmpty()) pk = null; else pk = PartialKey.valueOf(v); break; default: log.warn("Unrecognized option: " + entry); break; } } }
/** * Get a partial key specification by depth of the specification. * * @param depth * depth of scope (i.e., number of fields included) * @return partial key * @throws IllegalArgumentException * if no partial key has the given depth * @deprecated since 1.7.0 */ @Deprecated public static PartialKey getByDepth(int depth) { for (PartialKey d : PartialKey.values()) if (depth == d.depth) return d; throw new IllegalArgumentException("Invalid legacy depth " + depth); }
/** Create an IteratorSetting that prunes every Key it sees. * A null <tt>pk</tt> means reduce the Key to the seek start Key (which is the all empty fields Key if seek range starts at -inf). */ public static IteratorSetting iteratorSetting(int priority, PartialKey pk) { IteratorSetting itset = new IteratorSetting(priority, ApplyIterator.class); itset.addOption(ApplyIterator.APPLYOP, KeyRetainOnlyApply.class.getName()); if( pk == null ) itset.addOption(ApplyIterator.IGNORE_SEEK_EXCLUSIVE_START, TRUE.toString()); else itset.addOption(ApplyIterator.APPLYOP+GraphuloUtil.OPT_SUFFIX+PARTIAL_KEY, pk.name()); return itset; }
@Override public org.apache.accumulo.proxy.thrift.Key getFollowing(org.apache.accumulo.proxy.thrift.Key key, org.apache.accumulo.proxy.thrift.PartialKey part) throws TException { Key key_ = Util.fromThrift(key); PartialKey part_ = PartialKey.valueOf(part.toString()); Key followingKey = key_.followingKey(part_); return getProxyKey(followingKey); }
if (result != 0 || part.equals(PartialKey.ROW)) return result; if (result != 0 || part.equals(PartialKey.ROW_COLFAM)) return result; if (result != 0 || part.equals(PartialKey.ROW_COLFAM_COLQUAL)) return result; if (result != 0 || part.equals(PartialKey.ROW_COLFAM_COLQUAL_COLVIS)) return result; result = 0; if (result != 0 || part.equals(PartialKey.ROW_COLFAM_COLQUAL_COLVIS_TIME)) return result;