Constructs a JobKey instance from the individual byte encoded key
components.

@param keyComponents
as split on
@return a JobKey instance containing the decoded components
770355
public JobKey parseJobKey(byte[][] keyComponents) {
    // runId is inverted in the bytes representation so we get reverse
    // chronological order
    long encodedRunId = keyComponents.length > 3 ?
        Bytes.toLong(keyComponents[3]) : Long.MAX_VALUE;

    JobId jobId = keyComponents.length > 4 ?
        idConv.fromBytes(keyComponents[4]) : null;

    return new JobKey(Bytes.toString(keyComponents[0]),
        (keyComponents.length > 1 ? Bytes.toString(keyComponents[1]) : null),
        (keyComponents.length > 2 ? Bytes.toString(keyComponents[2]) : null),
        Long.MAX_VALUE - encodedRunId,
        jobId);
  }
1357721
@Override
  public JobDetail retrieveJob(String jobKey) {

    synchronized (lock) {
      JobWrapper jw = jobsByKey.get(jobKey);
      return (jw != null) ? (JobDetail) jw.jobDetail.clone() : null;
    }
  }
1361622
public Set<ComponentDto> selectComponentsByQualifiers(DbSession dbSession, Set<String> qualifiers) {
    checkArgument(!qualifiers.isEmpty(), "Qualifiers cannot be empty");
    return new HashSet<>(mapper(dbSession).selectComponentsByQualifiers(qualifiers));
  }
658705
public final SecretKey generateKey() {
        if (serviceIterator == null) {
            return spi.engineGenerateKey();
        }
        RuntimeException failure = null;
        KeyGeneratorSpi mySpi = spi;
        do {
            try {
                return mySpi.engineGenerateKey();
            } catch (RuntimeException e) {
                if (failure == null) {
                    failure = e;
                }
                mySpi = nextSpi(mySpi, true);
            }
        } while (mySpi != null);
        throw failure;
   }
812282
public static String makeKey(String... keys) {
        StringBuffer keyBuffer = new StringBuffer();
        for (String s : keys) {
            keyBuffer.append(s);
            keyBuffer.append(":");
        }
        return keyBuffer.toString();
    }
68271
protected static KeyComponent createComponent(Facet facet, ConverterRegistry converterRegistry, NamingStrategy namingStrategy, PojoBindingFactory pojoBindingFactory) {
        Converter converter = converterRegistry.getConverter(facet.getType());
        if (facet.hasAnnotation(PartitionKey.class)) {
            if (converter == null) {
                throw new HecateException("No converter found for @PartitionKey facet \"%s\".", facet.getName());
            }
            return new PartitionKeyComponent(facet, namingStrategy.getColumnName(facet), converter);
        } else {
            if (converter == null) {
                PojoBinding<?> pojoBinding = pojoBindingFactory.createPojoBinding(facet.getType().getRawType());
                return pojoBinding.getKeyBinding().createClusteringColumnReferenceComponent(facet, pojoBinding, namingStrategy);
            } else
                return new ClusteringColumnComponent(facet, namingStrategy.getColumnName(facet), converter);
        }
    }
1033690
private List<Integer> encodeInfoKeys(Collection<String> keys) {
        // sorted key list
        List<Integer> idxKeys = new ArrayList<>(keys.size());
        for (String key : keys) {
            if (!IGNORED_ATTRIBUTE_KEYS.contains(key) && (includeAllFormats || attributeFields.contains(key))) {
                Integer idx = infoKeyIndexMap.get(key);
                if (idx != null) {
                    idxKeys.add(idx);
                } else {
                    throw new IllegalArgumentException("Unknown key value " + key);
                }
            }
        }
        idxKeys.sort(Integer::compareTo);
        return idxKeys;
    }
446225
public FluentWebElement sendKeys(final CharSequence... keysToSend) {

        executeAndWrapReThrowIfNeeded(new SendKeys(keysToSend), Context.singular(context, "sendKeys", null, charSeqArrayAsHumanString(keysToSend)), true);
        return new FluentWebElement(delegate, currentElement, context, monitor, booleanInsteadOfNotFoundException);
    }
685929
public String[] getJobList() {
        String[] strings = new String[jobMap.keySet().size()];
        int i = 0;
        for (String s : jobMap.keySet()) {
            strings[i++] = s;
        }
        return strings;
    }
189903
static SecretKeySpec readSecretKey(DecryptionSetup ds) {
    Keyed<?> ksObject = DKV.getGet(ds._keystore_id);
    ByteVec ksVec = (ByteVec) (ksObject instanceof Frame ? ((Frame) ksObject).vec(0) : ksObject);
    InputStream ksStream = ksVec.openStream(null /*job key*/);
    try {
      KeyStore keystore = KeyStore.getInstance(ds._keystore_type);
      keystore.load(ksStream, ds._password);

      if (! keystore.containsAlias(ds._key_alias)) {
        throw new IllegalArgumentException("Alias for key not found");
      }

      java.security.Key key = keystore.getKey(ds._key_alias, ds._password);
      return new SecretKeySpec(key.getEncoded(), key.getAlgorithm());
    } catch (GeneralSecurityException e) {
      throw new RuntimeException("Unable to load key " + ds._key_alias + " from keystore " + ds._keystore_id, e);
    } catch (IOException e) {
      throw new RuntimeException("Failed to read keystore " + ds._keystore_id, e);
    }
  }
388828
@SuppressWarnings("unchecked")
    public <KP extends Object> KP getKeyPart(final Class<KP> keyPartClass) {
        return (KP) getListKeyPart().stream()
                                    .filter(kp -> kp != null && keyPartClass.isAssignableFrom(kp.getClass()))
                                    .findFirst()
                                    .get();
    }
1211303
@Override
  public byte[] toBytes(TaskKey taskKey) {
    return Bytes.add(jobKeyConv.toBytes(taskKey), Constants.SEP_BYTES,
        Bytes.toBytes(taskKey.getTaskId()));
  }
614458
private HashMap<String, JSONObject> buildKeyMap(String content) throws ConnectionException {
        HashMap<String, JSONObject> retMap = new HashMap<String, JSONObject>();
        JSONObject jwksPayload = new JSONObject(content);
        JSONArray keysArray = jwksPayload.getJSONArray("keys");

        for (int i=0;i<keysArray.length();i++) {
            JSONObject object = keysArray.getJSONObject(i);
            String keyId = object.getString("kid");
            retMap.put(keyId,object);
        }
        return retMap;
    }
671598
@Override
	public <K> AbstractKeyedStateBackend<K> createKeyedStateBackend(
		Environment env,
		JobID jobID,
		String operatorIdentifier,
		TypeSerializer<K> keySerializer,
		int numberOfKeyGroups,
		KeyGroupRange keyGroupRange,
		TaskKvStateRegistry kvStateRegistry,
		TtlTimeProvider ttlTimeProvider,
		MetricGroup metricGroup,
		@Nonnull Collection<KeyedStateHandle> stateHandles,
		CloseableRegistry cancelStreamRegistry) throws IOException {

		// first, make sure that the RocksDB JNI library is loaded
		// we do this explicitly here to have better error handling
		String tempDir = env.getTaskManagerInfo().getTmpDirectories()[0];
		ensureRocksDBIsLoaded(tempDir);

		// replace all characters that are not legal for filenames with underscore
		String fileCompatibleIdentifier = operatorIdentifier.replaceAll("[^a-zA-Z0-9\\-]", "_");

		lazyInitializeForJob(env, fileCompatibleIdentifier);

		File instanceBasePath = new File(
			getNextStoragePath(),
			"job_" + jobId + "_op_" + fileCompatibleIdentifier + "_uuid_" + UUID.randomUUID());

		LocalRecoveryConfig localRecoveryConfig =
			env.getTaskStateManager().createLocalRecoveryConfig();

		ExecutionConfig executionConfig = env.getExecutionConfig();
		StreamCompressionDecorator keyGroupCompressionDecorator = getCompressionDecorator(executionConfig);
		RocksDBKeyedStateBackendBuilder<K> builder = new RocksDBKeyedStateBackendBuilder<>(
			operatorIdentifier,
			env.getUserClassLoader(),
			instanceBasePath,
			getDbOptions(),
			stateName -> getColumnOptions(),
			kvStateRegistry,
			keySerializer,
			numberOfKeyGroups,
			keyGroupRange,
			executionConfig,
			localRecoveryConfig,
			priorityQueueStateType,
			ttlTimeProvider,
			metricGroup,
			stateHandles,
			keyGroupCompressionDecorator,
			cancelStreamRegistry
		).setEnableIncrementalCheckpointing(isIncrementalCheckpointsEnabled())
			.setEnableTtlCompactionFilter(isTtlCompactionFilterEnabled())
			.setNumberOfTransferingThreads(getNumberOfTransferingThreads())
			.setNativeMetricOptions(getMemoryWatcherOptions());
		return builder.build();
	}
674031
public SimpleOrderedMap<Object> create(
      ComponentCollection componentCollection, Boolean encode)
      throws IOException {
    MtasSolrCollectionResult data = createMtasSolrCollectionResult(
        componentCollection, encode ? false : true);
    // Create response
    SimpleOrderedMap<Object> mtasCollectionResponse = new SimpleOrderedMap<>();
    mtasCollectionResponse.add("key", componentCollection.key);
    if (encode) {
      mtasCollectionResponse.add("_encoded_data",
          MtasSolrResultUtil.encode(data));
    } else {
      mtasCollectionResponse.add("data", data);
      MtasSolrResultUtil.rewrite(mtasCollectionResponse, searchComponent);
    }
    return mtasCollectionResponse;
  }
784729
private <K> DataStream<T> partitionCustom(Partitioner<K> partitioner, Keys<T> keys) {
		KeySelector<T, K> keySelector = KeySelectorUtil.getSelectorForOneKey(keys, partitioner, getType(), getExecutionConfig());

		return setConnectionType(
				new CustomPartitionerWrapper<>(
						clean(partitioner),
						clean(keySelector)));
	}
259275
public Optional<MapperInstance> getKeySerializer( JType type ) {
        return Optional.fromNullable( keySerializers.get( type.getQualifiedSourceName() ) );
    }