Search in sources :

Example 96 with JsonIgnore

use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project incubator-pulsar by apache.

the class LoadReport method getBottleneckResourceType.

@JsonIgnore
public ResourceType getBottleneckResourceType() {
    ResourceType type = ResourceType.CPU;
    double maxUsage = systemResourceUsage.cpu.percentUsage();
    if (systemResourceUsage.memory.percentUsage() > maxUsage) {
        maxUsage = systemResourceUsage.memory.percentUsage();
        type = ResourceType.Memory;
    }
    if (systemResourceUsage.bandwidthIn.percentUsage() > maxUsage) {
        maxUsage = systemResourceUsage.bandwidthIn.percentUsage();
        type = ResourceType.BandwidthIn;
    }
    if (systemResourceUsage.bandwidthOut.percentUsage() > maxUsage) {
        maxUsage = systemResourceUsage.bandwidthOut.percentUsage();
        type = ResourceType.BandwidthOut;
    }
    return type;
}
Also used : ResourceType(org.apache.pulsar.policies.data.loadbalancer.SystemResourceUsage.ResourceType) JsonIgnore(com.fasterxml.jackson.annotation.JsonIgnore)

Example 97 with JsonIgnore

use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project incubator-pulsar by apache.

the class LoadReport method getSortedBundleStats.

@JsonIgnore
public TreeMap<String, NamespaceBundleStats> getSortedBundleStats(ResourceType resType) {
    if (bundleStats == null) {
        return null;
    }
    NamespaceBundleStatsComparator nsc = new NamespaceBundleStatsComparator(bundleStats, resType);
    TreeMap<String, NamespaceBundleStats> sortedBundleStats = Maps.newTreeMap(nsc);
    sortedBundleStats.putAll(bundleStats);
    return sortedBundleStats;
}
Also used : NamespaceBundleStatsComparator(org.apache.pulsar.common.util.NamespaceBundleStatsComparator) JsonIgnore(com.fasterxml.jackson.annotation.JsonIgnore)

Example 98 with JsonIgnore

use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project neweagle-api by apgzs.

the class AuthUser method getAuthorities.

@Override
@JsonIgnore
public Collection<? extends GrantedAuthority> getAuthorities() {
    Set<GrantedAuthority> authorities = new HashSet<>();
    authorities.add(new SimpleGrantedAuthority(TRIP_USER_ROLE));
    return authorities;
}
Also used : SimpleGrantedAuthority(org.springframework.security.core.authority.SimpleGrantedAuthority) SimpleGrantedAuthority(org.springframework.security.core.authority.SimpleGrantedAuthority) GrantedAuthority(org.springframework.security.core.GrantedAuthority) HashSet(java.util.HashSet) JsonIgnore(com.fasterxml.jackson.annotation.JsonIgnore)

Example 99 with JsonIgnore

use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project irida by phac-nml.

the class IridaSequenceFilePair method getForwardSequenceFile.

/**
 * Get the forward oriented {@link SequenceFile}
 *
 * @return Forward {@link SequenceFile}
 */
@JsonIgnore
public default IridaSequenceFile getForwardSequenceFile() {
    IridaSequenceFile[] pair = getFiles().toArray(new IridaSequenceFile[getFiles().size()]);
    String[] filenames = { pair[0].getFile().getFileName().toString(), pair[1].getFile().getFileName().toString() };
    int index = StringUtils.indexOfDifference(filenames[0], filenames[1]);
    if (Stream.of(forwardMatches).anyMatch(x -> String.valueOf(filenames[0].charAt(index)).equals(x))) {
        return pair[0];
    } else if (Stream.of(forwardMatches).anyMatch(x -> String.valueOf(filenames[1].charAt(index)).equals(x))) {
        return pair[1];
    } else {
        throw new NoSuchElementException();
    }
}
Also used : Stream(java.util.stream.Stream) JsonIgnore(com.fasterxml.jackson.annotation.JsonIgnore) Set(java.util.Set) NoSuchElementException(java.util.NoSuchElementException) StringUtils(org.apache.commons.lang3.StringUtils) SequenceFile(ca.corefacility.bioinformatics.irida.model.sequenceFile.SequenceFile) NoSuchElementException(java.util.NoSuchElementException) JsonIgnore(com.fasterxml.jackson.annotation.JsonIgnore)

Example 100 with JsonIgnore

use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project Gaffer by gchq.

the class If method getOperations.

@Override
@JsonIgnore
public Collection<Operation> getOperations() {
    final List<Operation> ops = new LinkedList<>();
    if (null == conditional) {
        ops.add(new OperationChain());
    } else {
        ops.add(OperationChain.wrap(conditional.getTransform()));
    }
    ops.add(OperationChain.wrap(then));
    ops.add(OperationChain.wrap(otherwise));
    return ops;
}
Also used : OperationChain(uk.gov.gchq.gaffer.operation.OperationChain) Operation(uk.gov.gchq.gaffer.operation.Operation) LinkedList(java.util.LinkedList) JsonIgnore(com.fasterxml.jackson.annotation.JsonIgnore)

Aggregations

JsonIgnore (com.fasterxml.jackson.annotation.JsonIgnore)113 lombok.val (lombok.val)14 ArrayList (java.util.ArrayList)12 HashMap (java.util.HashMap)8 Map (java.util.Map)8 HashSet (java.util.HashSet)7 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)5 Date (java.util.Date)5 Field (com.hortonworks.registries.common.Schema.Field)4 Set (java.util.Set)4 Schema (com.hortonworks.registries.common.Schema)3 PrimaryKey (com.hortonworks.registries.storage.PrimaryKey)3 EntitlementException (com.sun.identity.entitlement.EntitlementException)3 PolicyException (com.sun.identity.policy.PolicyException)3 JsonArray (io.vertx.core.json.JsonArray)3 List (java.util.List)3 SequenceFile (ca.corefacility.bioinformatics.irida.model.sequenceFile.SequenceFile)2 TrustAndKeyProvider (com.codingchili.core.security.TrustAndKeyProvider)2 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)2 TypeReference (com.fasterxml.jackson.core.type.TypeReference)2