phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From PengCheng Liang <lian...@hotmail.com>
Subject org.apache.phoenix.schema.ConstraintViolationException
Date Wed, 06 May 2015 11:21:34 GMT
Hi all, 
Is a character set error?
0: jdbc:phoenix:mvxl0490> CREATE INDEX css_cus_idx ON css.t_cs_customer(SUBSTR(STELEPHONE1,
1, 11));
Error: org.apache.phoenix.schema.ConstraintViolationException: CSS.CSS_CUS_IDX.: SUBSTR(CUST.STELEPHONE1,1,11)
may not exceed 11 bytes ('87678000(李女') (state=08000,code=101)
org.apache.phoenix.exception.PhoenixIOException: org.apache.phoenix.schema.ConstraintViolationException:
CSS.CSS_CUS_IDX.: SUBSTR(CUST.STELEPHONE1,1,11) may not exceed 11 bytes ('87678000(李女')
at org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:108)
at org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:538)
at org.apache.phoenix.iterate.ConcatResultIterator.getIterators(ConcatResultIterator.java:50)
at org.apache.phoenix.iterate.ConcatResultIterator.currentIterator(ConcatResultIterator.java:97)
at org.apache.phoenix.iterate.ConcatResultIterator.next(ConcatResultIterator.java:117)
at org.apache.phoenix.compile.UpsertCompiler$2.execute(UpsertCompiler.java:679)
at org.apache.phoenix.query.ConnectionQueryServicesImpl.updateData(ConnectionQueryServicesImpl.java:1991)
at org.apache.phoenix.schema.MetaDataClient.buildIndex(MetaDataClient.java:856)
at org.apache.phoenix.schema.MetaDataClient.createIndex(MetaDataClient.java:1136)
at org.apache.phoenix.compile.CreateIndexCompiler$1.execute(CreateIndexCompiler.java:95)
at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:280)
at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:272)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:270)
at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1063)
at sqlline.Commands.execute(Commands.java:822)
at sqlline.Commands.sql(Commands.java:732)
at sqlline.SqlLine.dispatch(SqlLine.java:808)
at sqlline.SqlLine.begin(SqlLine.java:681)
at sqlline.SqlLine.start(SqlLine.java:398)
at sqlline.SqlLine.main(SqlLine.java:292)
Caused by: java.util.concurrent.ExecutionException: org.apache.phoenix.schema.ConstraintViolationException:
CSS.CSS_CUS_IDX.: SUBSTR(CUST.STELEPHONE1,1,11) may not exceed 11 bytes ('87678000(李女')
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:202)
at org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:534)
... 19 more
Caused by: org.apache.phoenix.schema.ConstraintViolationException: CSS.CSS_CUS_IDX.: SUBSTR(CUST.STELEPHONE1,1,11)
may not exceed 11 bytes ('87678000(李女')
at org.apache.phoenix.schema.PTableImpl.newKey(PTableImpl.java:515)
at org.apache.phoenix.compile.UpsertCompiler.setValues(UpsertCompiler.java:116)
at org.apache.phoenix.compile.UpsertCompiler.upsertSelect(UpsertCompiler.java:159)
at org.apache.phoenix.compile.UpsertCompiler.access$000(UpsertCompiler.java:97)
at org.apache.phoenix.compile.UpsertCompiler$UpsertingParallelIteratorFactory.mutate(UpsertCompiler.java:195)
at org.apache.phoenix.compile.MutatingParallelIteratorFactory.newIterator(MutatingParallelIteratorFactory.java:61)
at org.apache.phoenix.iterate.ParallelIterators$1.call(ParallelIterators.java:92)
at org.apache.phoenix.iterate.ParallelIterators$1.call(ParallelIterators.java:83)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)


Mime
View raw message