Netflix / Priam

Co-Process for backup/recovery, Token Management, and Centralized Configuration management for Cassandra.
Apache License 2.0
1.04k stars 294 forks source link

restore fails via api /v1/backup/restore #247

Closed dane-xa closed 11 years ago

dane-xa commented 11 years ago

Hi,

I could use some help on an api error. I get the following error when attempting to restore using "curl localhost:8080/Priam/REST/v1/backup/restore"

SEVERE: The RuntimeException could not be mapped to a response, re-throwing to the HTTP container java.lang.UnsupportedOperationException at com.google.common.collect.ImmutableCollection.clear(ImmutableCollection.java:154) at com.netflix.priam.resources.BackupServlet.setRestoreKeyspaces(BackupServlet.java:270) at com.netflix.priam.resources.BackupServlet.restore(BackupServlet.java:233) at com.netflix.priam.resources.BackupServlet.restore(BackupServlet.java:146) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597)

I have the following properties set:

priam.acl.groupname: test_b priam.backup.hour: -1 priam.backup.incremental.enable: true priam.backup.retention: 4 priam.backup.threads: 8 priam.cache.location: /raid0/saved_caches priam.cass.home: /usr/share/cassandra priam.cass.process: jsvc priam.cass.startscript: /etc/init.d/cassandra start priam.cass.stopscript: /etc/init.d/cassandra stop priam.clustername: test_b priam.commitlog.location: /raid0/commitlog priam.data.location: /raid0/data priam.endpoint_snitch: org.apache.cassandra.locator.GossipingPropertyFileSnitch priam.multiregion.enable: true priam.s3.base_dir: backups priam.s3.bucket: priamtest priam.yamlLocation: /etc/cassandra/cassandra.yaml priam.zones.available: us-east-1b,us-east-1c,us-east-1d priam.restore.prefix: priamtest/backups/us-east-1/test_a/

Versions: Priam - master, built early July 2013 Cassandra - 1.2.3 Ubuntu 12.04 x64 m1.xlarge java version "1.6.0_41" Java(TM) SE Runtime Environment (build 1.6.0_41-b02) Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01, mixed mode)

timiblossom commented 11 years ago

Can you please give the exact date when you checked out the code? BackupServlet.java file seems to shift up or down a few lines so it is difficult to know. Thanks.

dane-xa commented 11 years ago

I was afraid of that. I'm not sure on the exact build date, but here's the latest commit for BackupServlet.java, and for the entire repo:

git log priam/src/main/java/com/netflix/priam/resources/BackupServlet.java

commit c8735afb631d1255e2a8eab72fbde286df47ede0 Merge: 0f6e485 19bd138 Author: SagarL sagarit2@gmail.com Date: Thu Mar 21 16:56:02 2013 -0700

Merging Incremental Restore changes with latest changes

git log

commit 91fd8ec7d8849dbbcac84a6b8d91c5a046af88e3 Merge: 0c6f1e2 9d4da54 Author: Jason Brown jasedbrown@gmail.com Date: Tue Jun 25 15:03:23 2013 -0700

Merge branch '1.1'
atrullmdsol commented 11 years ago

I'm seeing the identical java.lang.UnsupportedOperationException com.google.common.collect.ImmutableCollection.clear(ImmutableCollection.java:154)

When I try a /Priam/REST/v1/backup/restore or /Priam/REST/v1/backup/restore?daterange=201307241344,201307241643&keyspaces=$keyspace

Using Datastax built cassandra 1.2.6 and Priam built from Master at July 15th 12:52 (1.2.14-SNAPSHOT)

dane-xa - do you get anything back from /REST/v1/backup/list ? I get another exception there and I will raise an issue against that shortly. It follows that if you can't list backups, you can't expect a restore to work.

Regards,

Alex Trull

jasobrown commented 11 years ago

@timiblossom and I found the source of problem and should post a fix within a day.