Projects >> krati >>caef67153edaccb8ec3c5c7d13bd21e194a62634

Chunk
Conflicting content
        return ((LazyAvroGenericRecordSerializer)_valueSerializer).getSchema();
    }
    
<<<<<<< HEAD
=======
    

>>>>>>> c0d6e5e6baf21463785bdfec285c5178734753ce
    /**
     * A {@link Serializer} implementation that will lazily negotiate an avro {@link Schema} with
     * the remote krati store.
Solution content
        return ((LazyAvroGenericRecordSerializer)_valueSerializer).getSchema();
    }
    
    /**
     * A {@link Serializer} implementation that will lazily negotiate an avro {@link Schema} with
     * the remote krati store.
File
AvroStoreBusClientHttp.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
     * {@link IllegalStateException} if a {@link Schema} has not been negotiated yet.
     * 
     * @author dbuthay
<<<<<<< HEAD
     * @since 04/16, 2012
=======
     *
>>>>>>> c0d6e5e6baf21463785bdfec285c5178734753ce
     */
    private class LazyAvroGenericRecordSerializer implements Serializer {
        private AvroGenericRecordSerializer _delegate = null;
Solution content
     * {@link IllegalStateException} if a {@link Schema} has not been negotiated yet.
     * 
     * @author dbuthay
     * @since 04/16, 2012
     */
    private class LazyAvroGenericRecordSerializer implements Serializer {
        private AvroGenericRecordSerializer _delegate = null;
File
AvroStoreBusClientHttp.java
Developer's decision
Version 1
Kind of conflict
Comment
Chunk
Conflicting content
    private class LazyAvroGenericRecordSerializer implements Serializer {
        private AvroGenericRecordSerializer _delegate = null;
        private Schema _schema = null;
<<<<<<< HEAD
        
=======

>>>>>>> c0d6e5e6baf21463785bdfec285c5178734753ce
        @Override
        public GenericRecord deserialize(byte[] bytes) throws SerializationException {
            checkSchema();
Solution content
    private class LazyAvroGenericRecordSerializer implements Serializer {
        private AvroGenericRecordSerializer _delegate = null;
        private Schema _schema = null;
        
        @Override
        public GenericRecord deserialize(byte[] bytes) throws SerializationException {
            checkSchema();
File
AvroStoreBusClientHttp.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
        public GenericRecord deserialize(byte[] bytes) throws SerializationException {
            checkSchema();
            return _delegate.deserialize(bytes);
<<<<<<< HEAD
        }
        
=======

        }
>>>>>>> c0d6e5e6baf21463785bdfec285c5178734753ce
        @Override
        public byte[] serialize(GenericRecord record) throws SerializationException {
            checkSchema();
Solution content
        public GenericRecord deserialize(byte[] bytes) throws SerializationException {
            checkSchema();
            return _delegate.deserialize(bytes);
        }
        
        @Override
        public byte[] serialize(GenericRecord record) throws SerializationException {
            checkSchema();
File
AvroStoreBusClientHttp.java
Developer's decision
Version 1
Kind of conflict
Other
Chunk
Conflicting content
    }
}
         */
        public Schema getSchema() {
            return _schema;
<<<<<<< HEAD
        }
        
        /**
         * Check if the {@link Schema} has already been negotiated.
         * If not, try to negotiate and fail if not possible
         * 
         * @throws IllegalStateException if there was a problem negotiating the Schema, or
         * if the Schema is invalid.
         */
        private void checkSchema() { 
            if (_delegate == null) {
                // try to create a delegate,
                // First we need to negotiate a Schema
                try { 
                    String prop = getProperty(StoreKeys.KRATI_STORE_VALUE_SCHEMA);
                    _schema = Schema.parse(prop);
                    _delegate = new AvroGenericRecordSerializer(_schema);
                } catch (Exception e) {
                    throw new IllegalStateException("while negotiating Schema: " + e.getMessage(), e);
                }
            }
        }
=======
        }
        
        
        /**
         * Check if the {@link Schema} has already been negotiated.
         * If not, try to negotiate and fail if not possible
         * 
         * @throws IllegalStateException if there was a problem negotiating the Schema, or
         * if the Schema is invalid.
         */
        private void checkSchema() { 
            if (_delegate == null) {
                // try to create a delegate,
                // First we need to negotiate a Schema
                try { 
                    String prop = getProperty(StoreKeys.KRATI_STORE_VALUE_SCHEMA);
                    _schema = Schema.parse(prop);
                    _delegate = new AvroGenericRecordSerializer(_schema);
                } catch (Exception e) {
                    throw new IllegalStateException("while negotiating Schema: " + e.getMessage(), e);
                }
            }
        }
        
>>>>>>> c0d6e5e6baf21463785bdfec285c5178734753ce
Solution content
         */
        public Schema getSchema() {
            return _schema;
        }
        
        /**
         * Check if the {@link Schema} has already been negotiated.
         * If not, try to negotiate and fail if not possible
         * 
         * @throws IllegalStateException if there was a problem negotiating the Schema, or
         * if the Schema is invalid.
         */
        private void checkSchema() { 
            if (_delegate == null) {
                // try to create a delegate,
                // First we need to negotiate a Schema
                try { 
                    String prop = getProperty(StoreKeys.KRATI_STORE_VALUE_SCHEMA);
                    _schema = Schema.parse(prop);
                    _delegate = new AvroGenericRecordSerializer(_schema);
                } catch (Exception e) {
                    throw new IllegalStateException("while negotiating Schema: " + e.getMessage(), e);
                }
            }
        }
    }
}
File
AvroStoreBusClientHttp.java
Developer's decision
Version 1
Kind of conflict
Comment
Method declaration