Examples of PhoenixPigConfiguration


Examples of com.salesforce.phoenix.pig.PhoenixPigConfiguration

  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

Examples of org.apache.phoenix.pig.PhoenixPigConfiguration

  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

Examples of org.apache.phoenix.pig.PhoenixPigConfiguration

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

Examples of org.apache.phoenix.pig.PhoenixPigConfiguration

   
   
    @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

Examples of org.apache.phoenix.pig.PhoenixPigConfiguration

    }
   
    @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
Copyright © 2018 www.massapi.com. 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.