Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adding data file to cumulus so that the source code is not zipped in …

…the egg

work arounds for eternal upload bug
  • Loading branch information...
commit b350835c93cd5283cda0d78411ab5ac1b3913ff3 1 parent 34e6cbc
BuzzTroll authored
View
3  .idea/misc.xml
@@ -26,9 +26,6 @@
<option name="LOCALE" />
<option name="OPEN_IN_BROWSER" value="true" />
</component>
- <component name="ProjectResources">
- <default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype>
- </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_5" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
View
26 cumulus/cb/pycb/cbPosixBackend.py
@@ -105,14 +105,6 @@ def get_md5(self, data_key):
class cbPosixData(object):
def __init__(self, data_key, access="r", openIt=True):
-# file like stuff
- #self.closed = True
- #self.encoding =
- #self.errors
- #self.mode
- #self.name
- #self.newlines
- #self.softspace
self.fname = data_key
self.metafname = data_key + ".meta"
self.data_key = data_key
@@ -126,6 +118,7 @@ def __init__(self, data_key, access="r", openIt=True):
return
try:
+ # this allows head to be very fast
if access == "r":
mFile = open(self.metafname, 'r')
self.hashValue = mFile.readline()
@@ -145,11 +138,8 @@ def get_mod_time(self):
def get_md5(self):
if self.hashValue == None:
- if self.access == 'r':
- return None
- else:
- v = str(self.md5er.hexdigest()).strip()
- return v
+ v = str(self.md5er.hexdigest()).strip()
+ return v
return self.hashValue
def get_data_key(self):
@@ -206,9 +196,11 @@ def next(self):
def read(self, size=None):
if size == None:
- return self.file.read(self.blockSize)
+ st = self.file.read(self.blockSize)
else:
- return self.file.read(size)
+ st = self.file.read(size)
+ self.md5er.update(st)
+ return st
# def readline(self, size=None):
# def readlines(self, size=None):
@@ -216,6 +208,10 @@ def read(self, size=None):
def seek(self, offset, whence=None):
pycb.log(logging.WARNING, "Someone is seeking %s %d" % (self.fname, sys.exc_info()[0], offset), tb=traceback)
+ # reset the hash
+ if offset == 0:
+ self.md5er = hashlib.md5()
+ self.hashValue = None
return self.file.seek(offset, whence)
View
4 cumulus/cb/pycb/cbRequest.py
@@ -635,9 +635,7 @@ def endGet(self, dataObj):
mSum = base64.encodestring(base64.b16decode(eTag.upper()))
self.checkMD5 = mSum
- if self.checkMD5 != mSum:
- raise cbException('InvalidDigest')
-
+ pycb.log(logging.INFO, "sent %s etag %s" % (self.objectName, self.checkMD5))
self.setHeader(self.request, 'ETag', '"%s"' % (eTag))
# now that we have the file set delete on close to false
View
1  cumulus/cb/setup.py
@@ -43,5 +43,6 @@
needed.
""",
license="Apache2",
+ data_files=("../docs/", ["README.txt"]),
install_requires = ["Twisted", "boto == 1.9b", "pyOpenSSL", "pynimbusauthz"],
)
View
10 service/client/java/source/src/org/globus/workspace/cloud/client/util/CumulusTask.java
@@ -334,6 +334,7 @@ public long skip(long n)
{
private PrintStream pr;
private int colCount = 80;
+ private Date nextUpdate = null;
public CloudProgressPrinter(
PrintStream pr,
@@ -430,6 +431,14 @@ public void updateBytesTransferred(
public void flush()
{
+ Calendar now = Calendar.getInstance();
+ Date nowDt = now.getTime();
+
+ if (this.nextUpdate != null && nowDt.before(this.nextUpdate))
+ {
+ return;
+ }
+ this.nextUpdate = new Date(nowDt.getTime() + 1);
long total = getBytesToTransfer();
long sent = getBytesTransferred();
@@ -761,6 +770,7 @@ private S3Service getService()
j3p.setProperty("s3service.disable-dns-buckets", "true");
j3p.setProperty("s3service.s3-endpoint", host);
j3p.setProperty("s3service.https-only", this.useHttps);
+ j3p.setProperty("storage-service.internal-error-retry-max ", "1");
HostConfiguration hc = new HostConfiguration();
if(allowSelfSigned && this.useHttps.equalsIgnoreCase("true"))
Please sign in to comment.
Something went wrong with that request. Please try again.