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

Loknath Priyatham Teja Singamsetty  commented on PHOENIX-3114:
--------------------------------------------------------------

Yeah rows would remain same. INDEX_TYPE column is expected from result set and 
used in PhoenixMRJobSubmitter. Here is the code which populates the POJO 
PhoenixAsyncIndex. It looks like INDEX_TYPE info is used to determine if the 
index is local/global based on PTable.IndexType enum. 

        Statement s = con.createStatement();
        ResultSet rs = s.executeQuery(ASYNC_INDEX_INFO_QUERY);
        Map<String, PhoenixAsyncIndex> candidateIndexes = new HashMap<String, 
PhoenixAsyncIndex>();
        while (rs.next()) {
            PhoenixAsyncIndex indexInfo = new PhoenixAsyncIndex();
            indexInfo.setIndexType(IndexType.fromSerializedValue(rs
                    .getByte(PhoenixDatabaseMetaData.INDEX_TYPE)));
            
indexInfo.setDataTableName(rs.getString(PhoenixDatabaseMetaData.DATA_TABLE_NAME));
            
indexInfo.setTableSchem(rs.getString(PhoenixDatabaseMetaData.TABLE_SCHEM));
            
indexInfo.setTableName(rs.getString(PhoenixDatabaseMetaData.TABLE_NAME));
            
candidateIndexes.put(String.format(IndexTool.INDEX_JOB_NAME_TEMPLATE,
                indexInfo.getDataTableName(), indexInfo.getTableName()), 
indexInfo);
        }

> PhoenixMRJobSubmitter fails to create async secondary indexes
> -------------------------------------------------------------
>
>                 Key: PHOENIX-3114
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3114
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.8.0
>            Reporter: Loknath Priyatham Teja Singamsetty 
>            Assignee: Loknath Priyatham Teja Singamsetty 
>         Attachments: phoenix-3114.patch
>
>
> The INDEX_TYPE column is missing in the ASYNC_SECONDARY_INDEX query to fetch 
> the async index rows from system.catalog table. This is being used inside 
> PhoenixMRJobSubmitter. Unfortunately, the existing async secondary index test 
> cases for phoenix-mr-automation are succeeding. Created separate JIRA for 
> writing e2e test for secondary indexes
> 2016-07-25 07:36:10,744 DEBUG [8ff-shared--pool2-t1] 
> security.HBaseSaslRpcClient - Will read input token of size 32 for processing 
> by initSASLContext
> 2016-07-25 07:36:10,745 DEBUG [8ff-shared--pool2-t1] 
> security.HBaseSaslRpcClient - Will send token of size 32 from initSASLContext.
> 2016-07-25 07:36:10,745 DEBUG [8ff-shared--pool2-t1] 
> security.HBaseSaslRpcClient - SASL client context established. Negotiated 
> QoP: auth
> Exception in thread "main" org.apache.phoenix.schema.ColumnNotFoundException: 
> ERROR 504 (42703): Undefined column. columnName=INDEX_TYPE
>       at 
> org.apache.phoenix.compile.RowProjector.getColumnIndex(RowProjector.java:159)
>       at 
> org.apache.phoenix.jdbc.PhoenixResultSet.findColumn(PhoenixResultSet.java:178)
>       at 
> org.apache.phoenix.jdbc.PhoenixResultSet.getByte(PhoenixResultSet.java:334)
>       at 
> org.apache.phoenix.mapreduce.index.automation.PhoenixMRJobSubmitter.getCandidateJobs(PhoenixMRJobSubmitter.java:151)
>       at 
> org.apache.phoenix.mapreduce.index.automation.PhoenixMRJobSubmitter.scheduleIndexBuilds(PhoenixMRJobSubmitter.java:179)
>       at 
> org.apache.phoenix.mapreduce.index.automation.PhoenixMRJobSubmitter.main(PhoenixMRJobSubmitter.java:272)



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

Reply via email to