<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: phoneix seconday index blocking the updates of hbase table in phoenix client in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/phoneix-seconday-index-blocking-the-updates-of-hbase-table/m-p/173559#M42218</link>
    <description>&lt;P&gt;Can you provide the full code?I cant know how to get the 'indexList' and so on,Thank you.&lt;/P&gt;</description>
    <pubDate>Fri, 30 Dec 2016 12:24:12 GMT</pubDate>
    <dc:creator>1792313430</dc:creator>
    <dc:date>2016-12-30T12:24:12Z</dc:date>
    <item>
      <title>phoneix seconday index blocking the updates of hbase table in phoenix client</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/phoneix-seconday-index-blocking-the-updates-of-hbase-table/m-p/173551#M42210</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;We are using Phoenix indexes in both the cases ,only Method of Data loading into Hbase is different(1- put hbase command &amp;amp; 2- phoenix upsert command), why we are able to see new/updated records while loading the data through phoenix , why are not able to see new ones while loading the records into hbase directly ??&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The issue is - We are not getting updated/real time records
while querying Phoenix index tables as well as  parent hbase tables
through phoenix client . where as if I delete the phoenix indexes on hbase
parent tables, we are able to see updated records in hbase tables through
phoenix client .  May I know what will be the issue ??&lt;/P&gt;&lt;P&gt;But if I use the phoenix indexes on hbase tables which is
getting updated with new records through phoenix client(phoenix upsert query) ,
I am able to see new/updated records in habse table as well as phoenix index
table through phoenix client . &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2016 05:08:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/phoneix-seconday-index-blocking-the-updates-of-hbase-table/m-p/173551#M42210</guid>
      <dc:creator>srinivaspadala_</dc:creator>
      <dc:date>2016-09-29T05:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: phoneix seconday index blocking the updates of hbase table in phoenix client</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/phoneix-seconday-index-blocking-the-updates-of-hbase-table/m-p/173552#M42211</link>
      <description>&lt;P&gt;First off: you should not use HBase APIs to write data into Phoenix tables. Use the Phoenix API.&lt;/P&gt;&lt;P&gt;The reason you should not do this is the reason that you are not seeing the data you've written. Using Phoenix API's (the UPSERT command) is what triggers the update to the secondary index table. When you add data via the HBase APIs, Phoenix has no idea that you did this and thus cannot ensure referential integrity with your secondary indices. If you want to use Phoenix, use the Phoenix APIs to read and write data.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2016 05:10:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/phoneix-seconday-index-blocking-the-updates-of-hbase-table/m-p/173552#M42211</guid>
      <dc:creator>elserj</dc:creator>
      <dc:date>2016-09-29T05:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: phoneix seconday index blocking the updates of hbase table in phoenix client</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/phoneix-seconday-index-blocking-the-updates-of-hbase-table/m-p/173553#M42212</link>
      <description>&lt;P&gt;Thanks for your quick and valuable response . &lt;/P&gt;&lt;P&gt;Could you please let me know what is the way to do secondary indexing on hbase data with out using phoenix . i found some hindex using coprocessor , but that is on hbase 0.9.4 . it will be very helpful if you provide any reference link or guidence . FYI - hbase 1.1.2 is my current version . thank you so much . &lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2016 05:16:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/phoneix-seconday-index-blocking-the-updates-of-hbase-table/m-p/173553#M42212</guid>
      <dc:creator>srinivaspadala_</dc:creator>
      <dc:date>2016-09-29T05:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: phoneix seconday index blocking the updates of hbase table in phoenix client</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/phoneix-seconday-index-blocking-the-updates-of-hbase-table/m-p/173554#M42213</link>
      <description>&lt;P&gt;I would not recommend anything other than Phoenix &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2016 06:03:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/phoneix-seconday-index-blocking-the-updates-of-hbase-table/m-p/173554#M42213</guid>
      <dc:creator>elserj</dc:creator>
      <dc:date>2016-09-29T06:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: phoneix seconday index blocking the updates of hbase table in phoenix client</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/phoneix-seconday-index-blocking-the-updates-of-hbase-table/m-p/173555#M42214</link>
      <description>&lt;P&gt;If writing data table by using hbase API and want that secondary indexes created with Phoenix are also updated, you need to include following attributes in mutations(put/delete) while inserting data to data table so that Phoenix knows what all indexes needs to be updated. for eg:- Put mutation.&lt;/P&gt;&lt;PRE&gt;PTable dataPTable = PhoenixRuntime.getTableNoCache(conn, dataTableFullName);

List&amp;lt;PTable&amp;gt; indexes = dataPTable.getIndexes();
List&amp;lt;IndexMaintainer&amp;gt; maintainers = Lists.newArrayListWithExpectedSize(indexes.size());
for (PTable index : indexes) {
maintainers.add(index.getIndexMaintainer(dataPTable, conn));
}
ImmutableBytesWritable indexMetaDataPtr = new ImmutableBytesWritable(ByteUtil.EMPTY_BYTE_ARRAY);IndexMaintainer.serializeAdditional(dataPTable, indexMetaDataPtr, indexList,conn);

byte[] indexMetaData = ByteUtil.copyKeyBytesIfNecessary(indexMetaDataPtr);
Put put = new Put(CellUtil.cloneRow(cell));
put.setAttribute(PhoenixIndexCodec.INDEX_MD, indexMetaData);
put.setAttribute(PhoenixIndexCodec.INDEX_UUID, uuidValue);dataHtable.put(put)&lt;/PRE&gt;&lt;P&gt;Adjust some variables accordingly in above snippet.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2016 14:19:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/phoneix-seconday-index-blocking-the-updates-of-hbase-table/m-p/173555#M42214</guid>
      <dc:creator>asinghal</dc:creator>
      <dc:date>2016-09-29T14:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: phoneix seconday index blocking the updates of hbase table in phoenix client</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/phoneix-seconday-index-blocking-the-updates-of-hbase-table/m-p/173556#M42215</link>
      <description>&lt;P&gt;Thanks Ankit , looks like when ever we want to update indexes, we need to run the above put mutation program manually . but the data is coming in real time , performing queries on index table or also in real time. is it work?. correct me if am wrong . 
if it is work , please let me know what is the package i have to use and where and how to deploy the code . thank you .&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2016 00:26:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/phoneix-seconday-index-blocking-the-updates-of-hbase-table/m-p/173556#M42215</guid>
      <dc:creator>srinivaspadala_</dc:creator>
      <dc:date>2016-09-30T00:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: phoneix seconday index blocking the updates of hbase table in phoenix client</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/phoneix-seconday-index-blocking-the-updates-of-hbase-table/m-p/173557#M42216</link>
      <description>&lt;P&gt;Is it a hbase coprocessor ?? Could you please provide full example for the above code and how to run . thanks &lt;/P&gt;</description>
      <pubDate>Sat, 01 Oct 2016 08:20:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/phoneix-seconday-index-blocking-the-updates-of-hbase-table/m-p/173557#M42216</guid>
      <dc:creator>srinivaspadala_</dc:creator>
      <dc:date>2016-10-01T08:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: phoneix seconday index blocking the updates of hbase table in phoenix client</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/phoneix-seconday-index-blocking-the-updates-of-hbase-table/m-p/173558#M42217</link>
      <description>&lt;P&gt;you just need to add following two attributes in PUT which you are already creating for inserting data in HBase.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;put.setAttribute(PhoenixIndexCodec.INDEX_MD, indexMetaData);&lt;/LI&gt;&lt;LI&gt;put.setAttribute(PhoenixIndexCodec.INDEX_UUID, uuidValue);&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;To get indexMetaData,you can refer above snippet. &lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2016 15:16:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/phoneix-seconday-index-blocking-the-updates-of-hbase-table/m-p/173558#M42217</guid>
      <dc:creator>asinghal</dc:creator>
      <dc:date>2016-10-03T15:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: phoneix seconday index blocking the updates of hbase table in phoenix client</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/phoneix-seconday-index-blocking-the-updates-of-hbase-table/m-p/173559#M42218</link>
      <description>&lt;P&gt;Can you provide the full code?I cant know how to get the 'indexList' and so on,Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Dec 2016 12:24:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/phoneix-seconday-index-blocking-the-updates-of-hbase-table/m-p/173559#M42218</guid>
      <dc:creator>1792313430</dc:creator>
      <dc:date>2016-12-30T12:24:12Z</dc:date>
    </item>
  </channel>
</rss>

