Ah, yes. If the name writable name is > 500 bytes it is hashed before being stored to avoid the character limitation. This is done as follows: Hashing.sha512().hashString(creationHandle, Charsets.US_ASCII).toString()
So the easiest way to access the file would probably to be to use the FilesAPI and just pass it the writable name and let it do this for you, then you'll have a file handle with the finalized name, which you can copy and access via the blobstore API if you like. To do this construct an AppEngineFile with the namepart as the writable file name including the "writable:" prefix, and then invoke FileServiceImpl.getBlobKey() On Fri, May 10, 2013 at 8:35 AM, Eric Jahn <[email protected]> wrote: > Tom, > The files I'm searching for in datastore viewer were finalized, and I was > able to search for and find more recent finalized blobs using SELECT * FROM > __BlobFileIndex__ WHERE __key__=KEY('__BlobFileIndex__', 'SoMeKeyHere'); > and for still writable this works: > SELECT * FROM __BlobFileIndex__ WHERE __key__=KEY('__BlobFileIndex__', > 'writable:SoMeKeyHere'); > However, for the keys of the missing file, the query in the datastore > viewer returns "name must be under 500 bytes." Those >500 byte keys were > successful for accessing/writing to the original files with my AppEngine > code before they were finalized, so why is this length a problem now? Or > was exceedingly long key generation part of the Files API bug? I still > need to access those files, since they took a lot of expensive backend time > to generate them. Thanks! -Eric > > > On Tuesday, May 7, 2013 3:13:45 PM UTC-4, Tom Kaitchuck wrote: > >> If you have the writable file name you can use the datastore viewer to >> find the finalized file name. >> Go into the datastore viewer and enter the gql query: SELECT * FROM >> __BlobFileIndex__ >> This will show you the mapping. Then you can narrow it down by specifying >> the ID/Name as the writable file name. >> >> >> On Sun, May 5, 2013 at 10:00 PM, Eric Jahn <[email protected]> wrote: >> >>> Tom, >>> This is great news. I have one lingering problem as a result of the >>> Files API Bug. Before the Files API fix, I had persisted the file service >>> urls whilst I had been writing to them, and then finalized them >>> successfully. But, because of this bug I couldn't retrieve a blobstore key >>> by passing these urls to BlobKey.getKeyString(). btw, I'm not using java >>> MapReduce , just the App Engine Files API and Blobstore). Is there a way I >>> can somehow retrieve my finalized blobstore files which aren't appearing in >>> my App Engine dashboard Blobstore viewer? If I start with a new file, I >>> see them appear, but this is now after the Files API bug fix, I presume. >>> Thanks for any thoughts. -Eric >>> >>> >>> >>> On Wednesday, May 1, 2013 5:42:53 PM UTC-4, Tom Kaitchuck wrote: >>>> >>>> This is something we are aware of and are working on for future >>>> releases. >>>> >>>> For this update we encourage you to download and deploy the new code >>>> right away. >>>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Google App Engine" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to google-appengi...@**googlegroups.com. >>> To post to this group, send email to google-a...@googlegroups.**com. >>> >>> Visit this group at http://groups.google.com/** >>> group/google-appengine?hl=en<http://groups.google.com/group/google-appengine?hl=en> >>> . >>> >>> For more options, visit >>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out> >>> . >>> >>> >>> >> >> -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/google-appengine?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-appengine?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
