Package org.apache.phoenix.pig

Examples of org.apache.phoenix.pig.PhoenixPigConfiguration$PhoenixPigConfigurationUtil


  synchronized Connection getConnection(Configuration configuration) throws IOException {
      if (connection != null) {
        return connection;
      }
     
      config = new PhoenixPigConfiguration(configuration);     
    try {
      LOG.info("Initializing new Phoenix connection...");
      connection = config.getConnection();
      LOG.info("Initialized Phoenix connection, autoCommit="+ connection.getAutoCommit());
      return connection;
View Full Code Here


        }
        return psplits;
    }
   
    public void setConf(Configuration configuration) {
        this.phoenixConfiguration = new PhoenixPigConfiguration(configuration);
    }
View Full Code Here

   
   
    @Test
    public void testSchema() throws SQLException, IOException {
       
        final PhoenixPigConfiguration configuration = mock(PhoenixPigConfiguration.class);
        final List<ColumnInfo> columnInfos = ImmutableList.of(ID_COLUMN,NAME_COLUMN);
        when(configuration.getSelectColumnMetadataList()).thenReturn(columnInfos);
        final ResourceSchema actual = PhoenixPigSchemaUtil.getResourceSchema(configuration);
       
        // expected schema.
        final ResourceFieldSchema[] fields = new ResourceFieldSchema[2];
        fields[0] = new ResourceFieldSchema().setName("ID")
View Full Code Here

    }
   
    @Test(expected=IllegalDataException.class)
    public void testUnSupportedTypes() throws SQLException, IOException {
       
        final PhoenixPigConfiguration configuration = mock(PhoenixPigConfiguration.class);
        final List<ColumnInfo> columnInfos = ImmutableList.of(ID_COLUMN,LOCATION_COLUMN);
        when(configuration.getSelectColumnMetadataList()).thenReturn(columnInfos);
        PhoenixPigSchemaUtil.getResourceSchema(configuration);
        fail("We currently don't support Array type yet. WIP!!");
    }
View Full Code Here

TOP

Related Classes of org.apache.phoenix.pig.PhoenixPigConfiguration$PhoenixPigConfigurationUtil

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.