{"action":"closed","issue":{"url":"https://api.github.com/repos/Huawei-Spark/Backup-Repo/issues/23","labels_url":"https://api.github.com/repos/Huawei-Spark/Backup-Repo/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/Huawei-Spark/Backup-Repo/issues/23/comments","events_url":"https://api.github.com/repos/Huawei-Spark/Backup-Repo/issues/23/events","html_url":"https://github.com/Huawei-Spark/Backup-Repo/issues/23","id":107456363,"number":23,"title":"java.util.NoSuchElementException: key not found: encodingFormat","user":{"login":"xuzhiliang","id":7847537,"avatar_url":"https://avatars.githubusercontent.com/u/7847537?v=3","gravatar_id":"","url":"https://api.github.com/users/xuzhiliang","html_url":"https://github.com/xuzhiliang","followers_url":"https://api.github.com/users/xuzhiliang/followers","following_url":"https://api.github.com/users/xuzhiliang/following{/other_user}","gists_url":"https://api.github.com/users/xuzhiliang/gists{/gist_id}","starred_url":"https://api.github.com/users/xuzhiliang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xuzhiliang/subscriptions","organizations_url":"https://api.github.com/users/xuzhiliang/orgs","repos_url":"https://api.github.com/users/xuzhiliang/repos","events_url":"https://api.github.com/users/xuzhiliang/events{/privacy}","received_events_url":"https://api.github.com/users/xuzhiliang/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-21T07:09:48Z","updated_at":"2015-10-08T17:43:46Z","closed_at":"2015-10-08T17:43:46Z","body":"Hi,\r\nI am using the branch master, and  my environment is the following\r\nhbase 1.0.0-cdh5.4.5\r\nhadoop 2.6.0-cdh5.4.5\r\nspark 1.4\r\n\r\nI have inserted a set of rows in Hbase:\r\n\r\nhbase(main):010:0> scan 'student'\r\nROW                                                                  COLUMN+CELL                                                                                                                                                                                              \r\n 001                                                                 column=info:age, timestamp=1442818336941, value=20                                                                                                                                                       \r\n 001                                                                 column=info:name, timestamp=1442818355863, value=test01                                                                                                                                                  \r\n 002                                                                 column=info:age, timestamp=1442818367948, value=21                                                                                                                                                       \r\n 002                                                                 column=info:name, timestamp=1442818382205, value=test02                                                                                                                                                  \r\n2 row(s) in 0.0150 seconds\r\n\r\ni try in hbase-sql shell,it works well.\r\nCREATE TABLE student (\r\nid STRING,\r\nage STRING,\r\nname STRING,\r\nPRIMARY KEY (id)) \r\nMAPPED BY (student,COLS=[age=info.age, name=info.name]);\r\n\r\nthe result of 'select * from student;'\r\n+---+---+------+\r\n| id|age|  name|\r\n+---+---+------+\r\n|001| 20|test01|\r\n|002| 21|test02|\r\n+---+---+------+\r\n\r\nbut i try in the spark-shell,it occurs error.\r\n\r\nscala> import org.apache.spark.sql.hbase._\r\nimport org.apache.spark.sql.hbase._\r\n\r\nscala> val hbaseContext =  new HBaseSQLContext(sc)\r\nhbaseContext: org.apache.spark.sql.hbase.HBaseSQLContext = org.apache.spark.sql.hbase.HBaseSQLContext@29e2f29e\r\n\r\nscala> hbaseContext.read.format(\"org.apache.spark.sql.hbase.HBaseSource\").options(\r\n     |     Map(\"namespace\" -> \"\", \"tableName\" -> \"student\", \"hbaseTableName\" -> \"student\",\r\n     |       \"colsSeq\" -> \"id,age,name\",\r\n     |       \"keyCols\" -> \"id,string\",\r\n     |       \"nonKeyCols\" ->  \"age,string,info,age;name,string,info,name\")).load\r\njava.util.NoSuchElementException: key not found: encodingFormat\r\n  at scala.collection.MapLike$class.default(MapLike.scala:228)\r\n  at org.apache.spark.sql.sources.CaseInsensitiveMap.default(ddl.scala:463)\r\n  at scala.collection.MapLike$class.apply(MapLike.scala:141)\r\n  at org.apache.spark.sql.sources.CaseInsensitiveMap.apply(ddl.scala:463)\r\n  at org.apache.spark.sql.hbase.HBaseSource.createRelation(HBaseRelation.scala:50)\r\n  at org.apache.spark.sql.sources.ResolvedDataSource$.apply(ddl.scala:265)\r\n  at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:114)\r\n  at $iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC.<init>(<console>:34)\r\n  at $iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC.<init>(<console>:39)\r\n  at $iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC.<init>(<console>:41)\r\n  at $iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC.<init>(<console>:43)\r\n  at $iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC.<init>(<console>:45)\r\n  at $iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC.<init>(<console>:47)\r\n  at $iwC$$iwC$$iwC$$iwC$$iwC$$iwC.<init>(<console>:49)\r\n............\r\n\r\nneed your help,thinks?"}}