Github user JPercivall commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1202#discussion_r87661939
  
    --- Diff: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/swap/SimpleSwapDeserializer.java
 ---
    @@ -0,0 +1,303 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.nifi.controller.swap;
    +
    +import java.io.DataInputStream;
    +import java.io.EOFException;
    +import java.io.IOException;
    +import java.io.InputStream;
    +import java.nio.charset.StandardCharsets;
    +import java.util.ArrayList;
    +import java.util.Collections;
    +import java.util.List;
    +
    +import org.apache.nifi.controller.queue.FlowFileQueue;
    +import org.apache.nifi.controller.queue.QueueSize;
    +import org.apache.nifi.controller.repository.FlowFileRecord;
    +import org.apache.nifi.controller.repository.IncompleteSwapFileException;
    +import org.apache.nifi.controller.repository.StandardFlowFileRecord;
    +import org.apache.nifi.controller.repository.SwapContents;
    +import org.apache.nifi.controller.repository.SwapSummary;
    +import org.apache.nifi.controller.repository.claim.ResourceClaim;
    +import org.apache.nifi.controller.repository.claim.ResourceClaimManager;
    +import org.apache.nifi.controller.repository.claim.StandardContentClaim;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +
    +public class SimpleSwapDeserializer implements SwapDeserializer {
    +    public static final int SWAP_ENCODING_VERSION = 10;
    +    private static final Logger logger = 
LoggerFactory.getLogger(SimpleSwapDeserializer.class);
    +
    +    @Override
    +    public SwapSummary getSwapSummary(final DataInputStream in, final 
String swapLocation, final ResourceClaimManager claimManager) throws 
IOException {
    +        final int swapEncodingVersion = in.readInt();
    +        if (swapEncodingVersion > SWAP_ENCODING_VERSION) {
    --- End diff --
    
    Wouldn't the highest Encoding version this accepts be 9 (where 10 is this 
latest version which utilizes the new format)?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to