[ 
https://issues.apache.org/jira/browse/PIRK-25?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15390874#comment-15390874
 ] 

ASF GitHub Bot commented on PIRK-25:
------------------------------------

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

    https://github.com/apache/incubator-pirk/pull/18#discussion_r71979713
  
    --- Diff: 
src/main/java/org/apache/pirk/serialization/SerializationService.java ---
    @@ -0,0 +1,49 @@
    
+/*******************************************************************************
    + * 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.pirk.serialization;
    +
    +import java.io.ByteArrayOutputStream;
    +import java.io.IOException;
    +import java.io.InputStream;
    +import java.io.OutputStream;
    +
    +/*
    + * Ability to read and write objects to/from a stream.
    + */
    +public abstract class SerializationService
    +{
    +  public abstract <T> T read(InputStream stream, Class<T> type) throws 
IOException;
    +
    +  public abstract void write(OutputStream w, Storable obj) throws 
IOException;
    +
    +  public byte[] toBytes(Storable obj)
    +  {
    +    ByteArrayOutputStream bos = new ByteArrayOutputStream();
    +
    +    try
    --- End diff --
    
    Change to try(ByteArrayOutputStream bos = new ByteArrayOutputStream(); )


> Serialization and storage changes to Querier, Query, and Response
> -----------------------------------------------------------------
>
>                 Key: PIRK-25
>                 URL: https://issues.apache.org/jira/browse/PIRK-25
>             Project: PIRK
>          Issue Type: Improvement
>          Components: Querier, Responder
>            Reporter: Tim Ellison
>            Assignee: Tim Ellison
>
> Introduce serialization services that can flatten objects into a
> variety of different formats. Currently just reusing the Java
> serialization code until the project is ready to adopt other
> serializers.
> Introduce storage services that can store objects and retrieve them.
> Currently just reusing the local file system and HDFS. The storage
> service uses one of the serialization services to flatten the objects.
> Remove code from Querier, Query, and Response that was serializing
> and storing each of them; and update the callers to use the storage
> services.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to