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

    https://github.com/apache/spark/pull/5645#discussion_r29209693
  
    --- Diff: 
streaming/src/main/java/org/apache/spark/streaming/util/WriteAheadLogSegment.java
 ---
    @@ -0,0 +1,26 @@
    +/*
    + * 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.spark.streaming.util;
    +
    +/**
    + * This is an interface that represent the information required by any 
implementation of
    + * a WriteAheadLog to read a written record.
    + */
    [email protected]
    +public interface WriteAheadLogSegment extends java.io.Serializable {
    --- End diff --
    
    I wonder if we should more explicitly build the serialization of these 
segment identifiers into this interface. One extreme option is to have the 
segment identifiers actually be byte buffers and ask the user to deal on their 
own with serializing them.
    
    The main concerns I have are the following:
    1. Individual implementations of this must be java Serializable, but it's 
not possible to reflect that in the implementation.
    2. If those implementations want to evolve over different versions for 
instance they add a new field to the segment identifier, it will be tricky for 
them to do in a way that's backwards compatible (they'll have to write a custom 
externalization logic, which isn't really used for backwards compatibility).


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to