{"action":"created","issue":{"url":"https://api.github.com/repos/scylladb/scylla-tools-java/issues/25","repository_url":"https://api.github.com/repos/scylladb/scylla-tools-java","labels_url":"https://api.github.com/repos/scylladb/scylla-tools-java/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/scylladb/scylla-tools-java/issues/25/comments","events_url":"https://api.github.com/repos/scylladb/scylla-tools-java/issues/25/events","html_url":"https://github.com/scylladb/scylla-tools-java/issues/25","id":217039754,"number":25,"title":"sstabledump unable to load schema","user":{"login":"duarten","id":501746,"avatar_url":"https://avatars2.githubusercontent.com/u/501746?v=3","gravatar_id":"","url":"https://api.github.com/users/duarten","html_url":"https://github.com/duarten","followers_url":"https://api.github.com/users/duarten/followers","following_url":"https://api.github.com/users/duarten/following{/other_user}","gists_url":"https://api.github.com/users/duarten/gists{/gist_id}","starred_url":"https://api.github.com/users/duarten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duarten/subscriptions","organizations_url":"https://api.github.com/users/duarten/orgs","repos_url":"https://api.github.com/users/duarten/repos","events_url":"https://api.github.com/users/duarten/events{/privacy}","received_events_url":"https://api.github.com/users/duarten/received_events","type":"User","site_admin":false},"labels":[{"id":246050830,"url":"https://api.github.com/repos/scylladb/scylla-tools-java/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":{"login":"elcallio","id":7113590,"avatar_url":"https://avatars2.githubusercontent.com/u/7113590?v=3","gravatar_id":"","url":"https://api.github.com/users/elcallio","html_url":"https://github.com/elcallio","followers_url":"https://api.github.com/users/elcallio/followers","following_url":"https://api.github.com/users/elcallio/following{/other_user}","gists_url":"https://api.github.com/users/elcallio/gists{/gist_id}","starred_url":"https://api.github.com/users/elcallio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elcallio/subscriptions","organizations_url":"https://api.github.com/users/elcallio/orgs","repos_url":"https://api.github.com/users/elcallio/repos","events_url":"https://api.github.com/users/elcallio/events{/privacy}","received_events_url":"https://api.github.com/users/elcallio/received_events","type":"User","site_admin":false},"assignees":[{"login":"elcallio","id":7113590,"avatar_url":"https://avatars2.githubusercontent.com/u/7113590?v=3","gravatar_id":"","url":"https://api.github.com/users/elcallio","html_url":"https://github.com/elcallio","followers_url":"https://api.github.com/users/elcallio/followers","following_url":"https://api.github.com/users/elcallio/following{/other_user}","gists_url":"https://api.github.com/users/elcallio/gists{/gist_id}","starred_url":"https://api.github.com/users/elcallio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elcallio/subscriptions","organizations_url":"https://api.github.com/users/elcallio/orgs","repos_url":"https://api.github.com/users/elcallio/repos","events_url":"https://api.github.com/users/elcallio/events{/privacy}","received_events_url":"https://api.github.com/users/elcallio/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/scylladb/scylla-tools-java/milestones/1","html_url":"https://github.com/scylladb/scylla-tools-java/milestone/1","labels_url":"https://api.github.com/repos/scylladb/scylla-tools-java/milestones/1/labels","id":2411470,"number":1,"title":"1.7","description":"","creator":{"login":"slivne","id":3465480,"avatar_url":"https://avatars3.githubusercontent.com/u/3465480?v=3","gravatar_id":"","url":"https://api.github.com/users/slivne","html_url":"https://github.com/slivne","followers_url":"https://api.github.com/users/slivne/followers","following_url":"https://api.github.com/users/slivne/following{/other_user}","gists_url":"https://api.github.com/users/slivne/gists{/gist_id}","starred_url":"https://api.github.com/users/slivne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slivne/subscriptions","organizations_url":"https://api.github.com/users/slivne/orgs","repos_url":"https://api.github.com/users/slivne/repos","events_url":"https://api.github.com/users/slivne/events{/privacy}","received_events_url":"https://api.github.com/users/slivne/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":0,"state":"open","created_at":"2017-03-26T09:37:24Z","updated_at":"2017-03-30T08:49:47Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2017-03-26T09:35:29Z","updated_at":"2017-04-05T14:20:37Z","closed_at":null,"body":"Scylla version: master\r\n\r\nsstabledump is unable to load the schema to process a sstable, and fails with a `NullPointerException`.\r\n\r\nTo repro, just create any table and insert some data:\r\n\r\n```\r\necho \"create keyspace ks with replication = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };\" | $SCYLLA_TOOLS_HOME/bin/cqlsh\r\necho \"create table ks.cf(p text, c text, v int, primary key (p, c));\" |  $SCYLLA_TOOLS_HOME/bin/cqlsh\r\nfor i in `seq 1 1000`; do echo  \"insert into ks.cf (p, c, v) values ('key1', '$i', 0);\" ; done | $SCYLLA_TOOLS_HOME/bin/cqlsh\r\n```\r\n\r\nTrying to use sstabledump results in:\r\n\r\n```\r\n$SCYLLA_TOOLS_HOME/tools/bin/sstabledump $SCYLLA_DATA_DIR/ks/cf-aa2f2690120611e7aaaf000000000000/ks-cf-ka-1-Data.db\r\nException in thread \"main\" java.lang.NullPointerException\r\n\tat org.apache.cassandra.io.sstable.format.SSTableReader.open(SSTableReader.java:471)\r\n\tat org.apache.cassandra.io.sstable.format.SSTableReader.openNoValidation(SSTableReader.java:387)\r\n\tat org.apache.cassandra.tools.SSTableExport.run(SSTableExport.java:202)\r\n\tat com.scylladb.tools.SSTableExport.main(SSTableExport.java:37)\r\n```\r\n\r\nApparently, the column family metadata is null, which gets returned in `com.scylladb.tools.SSTableExport#metadataFromSSTable`, by `Schema.instance.getCFMetaData(desc)`. A few lines before we try to do a local query to load the schemas, but that obviously returns nothing."},"comment":{"url":"https://api.github.com/repos/scylladb/scylla-tools-java/issues/comments/291876477","html_url":"https://github.com/scylladb/scylla-tools-java/issues/25#issuecomment-291876477","issue_url":"https://api.github.com/repos/scylladb/scylla-tools-java/issues/25","id":291876477,"user":{"login":"elcallio","id":7113590,"avatar_url":"https://avatars2.githubusercontent.com/u/7113590?v=3","gravatar_id":"","url":"https://api.github.com/users/elcallio","html_url":"https://github.com/elcallio","followers_url":"https://api.github.com/users/elcallio/followers","following_url":"https://api.github.com/users/elcallio/following{/other_user}","gists_url":"https://api.github.com/users/elcallio/gists{/gist_id}","starred_url":"https://api.github.com/users/elcallio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elcallio/subscriptions","organizations_url":"https://api.github.com/users/elcallio/orgs","repos_url":"https://api.github.com/users/elcallio/repos","events_url":"https://api.github.com/users/elcallio/events{/privacy}","received_events_url":"https://api.github.com/users/elcallio/received_events","type":"User","site_admin":false},"created_at":"2017-04-05T14:20:36Z","updated_at":"2017-04-05T14:20:36Z","body":"Was the cassandra.yaml used by the tool configured with the right \"datadirs\" setting, i.e. path to the scylla data dir?"}}
{"actor":{"display_login":"elcallio"}}