hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dealmaker <vin...@gmail.com>
Subject Re: How do I convert DataInput and ResultSet to array of String?
Date Tue, 02 Jun 2009 04:53:20 GMT

bump.  Does anyone know?

I am using the following class of arraywritable:

  private static class StringArrayWritable extends ArrayWritable { 
    private StringArrayWritable (String [] aSString) { 
      super (aSString); 
    } 
  } 


dealmaker wrote:
> 
> Hi,
>   How do I convert DataInput to array of String?
>   How do I convert ResultSet to array of String?
> Thanks.  Following is the code:
> 
>   static class Record implements Writable, DBWritable {
>     String [] aSAssoc;
> 
>     public void write(DataOutput arg0) throws IOException {
>       throw new UnsupportedOperationException("Not supported yet.");
>     }
> 
>     public void readFields(DataInput in) throws IOException {
>       this.aSAssoc = // How to convert DataInput to String Array?
>     }
> 
>     public void write(PreparedStatement arg0) throws SQLException {
>       throw new UnsupportedOperationException("Not supported yet.");
>     }
> 
>     public void readFields(ResultSet rs) throws SQLException {
>       this.aSAssoc = // How to convert ResultSet to String Array?
>     }
>   }
> 
> 

-- 
View this message in context: http://www.nabble.com/How-do-I-convert-DataInput-and-ResultSet-to-array-of-String--tp23770747p23826464.html
Sent from the Hadoop core-user mailing list archive at Nabble.com.


Mime
View raw message