Infinispanからのデータ取得後に実行される処理。

@param input Tuple
@param lookupKey 取得に使用したKey
@param lookupValue 取得したValue(取得されなかった場合はnull)
492302
protected void onLookupAfter(StreamMessage input, K lookupKey, V lookupValue)
    {
        // デフォルトでは取得した結果がnull以外の場合、下流にデータを流す。
        if (lookupValue != null)
        {
            StreamMessage message = new StreamMessage();
            message.addField(FieldName.MESSAGE_KEY, lookupKey);
            message.addField(FieldName.MESSAGE_VALUE, lookupValue);

            emitWithGrouping(message, lookupKey, lookupKey.toString());
        }
    }
428770
public ResourceInjection byLookup(final String lookup) {

        final ResourceLiteral resource = new ResourceLiteral();
        resource.setLookup(lookup);
        matchingResources.add(resource);
        return this;
    }
219343
public static HierarchicalConfiguration findForName(final HierarchicalConfiguration config, final String subKey, final String nameKey,
		final String nameValue)
			throws ConfigurationException {
		for (HierarchicalConfiguration subConfig : config.configurationsAt(subKey)) {
			String name = subConfig.getString(nameKey);
			if (name.equals(nameValue)) {
				return subConfig;
			}
		}
		// 没有找到
		throw new ConfigurationException(MessageFormats.format(ResourceBundles.getBundle(RESOURCE_BASENAME), "subnodeNotFound", nameKey, nameValue, subKey));
	}
42171
public void putAllValues(Map<String, V> input) {
        for (Map.Entry<String, V> entry : input.entrySet()) {
            put(entry.getKey(), entry.getValue());
        }
    }
725634
private void addKeyToTuple(Tuple tuple, ByteBuffer key, CfDef cfDef, AbstractType comparator) throws IOException
    {
        if( comparator instanceof AbstractCompositeType )
        {
            setTupleValue(tuple, 0, composeComposite((AbstractCompositeType)comparator,key));
        }
        else
        {
            setTupleValue(tuple, 0, cassandraToObj(getDefaultMarshallers(cfDef).get(MarshallerType.KEY_VALIDATOR), key));
        }

    }
1355165
public static void addValue(String key, Object value, MultiValueMap<String, String> params) {
        if (value != null) {
            params.add(key, value.toString());
        }
    }
1225799
@Override
	public final void map(INPUT_KEY key, INPUT_VALUE value, Context context)
	    throws IOException, InterruptedException {
		map(key, value, this.context, collector);
	}
10406
private static void checkValueInPossibilities(Object val, IConfigKey configKey) {
		if (val != null && configKey.getPossibleValues() != null && !configKey.getPossibleValues().contains(val)) {
			throw new RuntimeException(String.format("Invalid value for key=[%s], possibles=%s",
				configKey.getKey(), configKey.getPossibleValues()));
		}
	}
329863
public void optimizedSwitch(String def, LookupList list) throws IOException
    {
        if (list.isEmpty())
        {
            throw new IllegalArgumentException("empty lookuplist");
        }
        if (list.size() == 1)
        {
            for (LookupPair lp : list)
            {
                iconst(lp.getMatch());
                if_icmpeq(lp.getTarget());
            }
            goto_n(def);
        }
        else
        {
            if (optimize && list.canOptimize())
            {
                for (LookupPair lp : list)
                {
                    String next = createBranch();
                    dup();
                    iconst(lp.getMatch());
                    if_icmpne(next);
                    pop();
                    goto_n(lp.getTarget());
                    fixAddress(next);
                }
                pop();
                goto_n(def);
            }
            else
            {
                if (list.isContiguous())    // note! list is sorted at this point
                {
                    String[] symbols = new String[list.size()];
                    int index = 0;
                    for (LookupPair lp : list)
                    {
                        symbols[index++] = lp.getTarget();
                    }
                    tableswitch(def, list.get(0).getMatch(), list.get(list.size()-1).getMatch(), symbols);
                }
                else
                {
                    lookupswitch(def, list);
                }
            }
        }
    }
255465
ValueIndex lookup(IndexReader reader, String field, String prefix)
   {
      synchronized (cache)
      {
         Map<Key, ValueIndex> readerCache = cache.get(reader);
         if (readerCache == null)
         {
            return null;
         }
         return readerCache.get(new Key(field, prefix));
      }
   }
1158789
@SuppressWarnings("unchecked")
    public E lookup(final int key)
    {
        @DoNotSub int size = this.size;
        final int[] keys = this.keys;
        final Object[] values = this.values;

        for (@DoNotSub int i = 0; i < size; i++)
        {
            if (keys[i] == key)
            {
                final E value = (E)values[i];

                makeMostRecent(key, value, i);

                return value;
            }
        }

        final E value = factory.apply(key);

        if (value != null)
        {
            if (size == capacity)
            {
                closer.accept((E)values[size - 1]);
            }
            else
            {
                size++;
                this.size = size;
            }

            makeMostRecent(key, value, size - 1);
        }

        return value;
    }
545225
@Override
    public final Integer optInt(final String key, final Integer defaultValue) {
        Integer result = optInt(key);
        return result == null ? defaultValue : result;
    }
10305
public V get(Object key) {
	checkKey(key);
	
	String cs = (String)key;
	Node<V> n = lookup(cs);
	return (n == null) ? null : n.value;
    }
929306
private void setMapTupleValues(Tuple tuple, int position, Object value, AbstractType<?> validator) throws ExecException
    {
        AbstractType<?> keyValidator = ((MapType<?, ?>) validator).getKeysType();
        AbstractType<?> valueValidator = ((MapType<?, ?>) validator).getValuesType();

        int i = 0;
        Tuple innerTuple = TupleFactory.getInstance().newTuple(((Map<?,?>) value).size());
        for(Map.Entry<?,?> entry :  ((Map<Object, Object>)value).entrySet())
        {
            Tuple mapEntryTuple = TupleFactory.getInstance().newTuple(2);
            setTupleValue(mapEntryTuple, 0, cassandraToPigData(entry.getKey(), keyValidator), keyValidator);
            setTupleValue(mapEntryTuple, 1, cassandraToPigData(entry.getValue(), valueValidator), valueValidator);
            innerTuple.set(i, mapEntryTuple);
            i++;
        }
        tuple.set(position, innerTuple);
    }
1169422
function lookup(name, stack, defaultValue) {
    if (name === ".") {
      return stack[stack.length - 1];
    }

    var names = name.split(".");
    var lastIndex = names.length - 1;
    var target = names[lastIndex];

    var value, context, i = stack.length, j, localStack;
    while (i) {
      localStack = stack.slice(0);
      context = stack[--i];

      j = 0;
      while (j < lastIndex) {
        context = context[names[j++]];

        if (context == null) {
          break;
        }

        localStack.push(context);
      }

      if (context && typeof context === "object" && target in context) {
        value = context[target];
        break;
      }
    }

    // If the value is a function, call it in the current context.
    if (typeof value === "function") {
      value = value.call(localStack[localStack.length - 1]);
    }

    if (value == null)  {
      return defaultValue;
    }

    return value;
  }
731059
@Override
	public boolean next(LongWritable key, Text value) throws IOException {
		JsonToken token;
		
		// first call to nextKeyValue() so we need to create the parser and move to the
		// feature array
		if (parser == null) {
			parser = new JsonFactory().createJsonParser(inputStream);
			
			parser.setCodec(new ObjectMapper());
			
			token = parser.nextToken();
			
			while (token != null && !(token == JsonToken.START_ARRAY &&
					parser.getCurrentName() != null && parser.getCurrentName().equals("features"))) {
				token = parser.nextToken();
			}
			
			if (token == null) return false; // never found the features array
		}

		key.set(parser.getCurrentLocation().getCharOffset());
		
		token = parser.nextToken();
		
		// this token should be a start object with no name
		if (token == null || !(token == JsonToken.START_OBJECT && parser.getCurrentName() == null))
			return false;

		ObjectNode node = parser.readValueAsTree();

		value.set(node.toString());

		return true;
	}
621023
function lookupKey(state, bindings, key) {
  if(key in bindings) {
    var arr = bindings[key]
    for(var i=0, n=arr.length; i<n; ++i) {
      if(state[virtualKeyCode(arr[i])]) {
        return true
      }
    }
    return false
  }
  var kc = virtualKeyCode(key)
  if(kc >= 0) {
    return state[kc]
  }
  return false
}