-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ObjectStoreGlobber.glob(path) is returning null. Seems that globStatus(path) is not handling the wildcard * properly #95
Comments
@djalova Can you please look at it? Thanks |
@gilv I have objects with that structure but if I query for |
@djalova thanks. But there is some bug with returning wrong results when there are partitions |
@gilv For |
I am also seeing an inconsistency with the default file system when there are no results returned from calling ObjectStoreFileSystem.globStatus. An empty array is expected but null is returned instead. I am seeing NullPointerException in many places because of this difference. Can this be changed to return an empty array when there are no results. |
@robinnt This should be fixed in master, are you still running into NPEs with the latest code? |
@djalova I tried the code in the master branch and the NPEs are fixed. In the hive branch the fixes are not there but there are other fixes that are in progress that are needed. Can you add the NPE fix to the hive branch. |
@robinnt The commit that fixes this should be in the hive branch as well. Can you send me a stack trace? |
@djalova ok got it. Thanks. |
Using the latest code in hive-support branch I am still seeing a problem where a call to globStatus returns an empty array when objects exist in swift that match. These objects exist in swift:
But nothing is returned by
|
@robinnt Does it still pick up everything if you query for |
@djalova Also no results returned with globStatus("/gendata_19yrs_stoc*") |
@robinnt Do you have any logs I can look at? We have tests in TestSwiftOperations.java that mimic your scenario and those are passing. Maybe there is another issue here. |
Here is part of the log from calling globStatus until 404 Not Found is returned
|
@robinnt Does your query fail? I didn't see any exceptions thrown. The 404 error occurs because the ObjectStorefileSystem.listStatus() tries to look for objects that match the path exactly, and then when it fails it then decides to look for objects with that prefix. I can fix this behavior, but if you are running into any errors this isn't likely to be the cause. In the logs, the listing eventually returns 8 objects. |
That is correct there are no longer any exceptions thrown but the data is not committed into the correct location for the table so the table appears to be empty. This log is from a Big SQL LOAD command where the data is written to a temp directory (gendata_19yrs_stoc/_DYN0.127403861618094193923682792174938877438) until all map tasks are completed successfully and then the data is moved to the final location (gendata_19yrs_stoc/). The globStatus is called during the move from temp dir to final dir but it incorrectly returns 0 objects so the commit fails with no data moved to the final dir. When the table is queried it is empty because all the data is still under the temp dir and was not properly moved to the table's location. |
It seems in the logs there is a delete operation before the listing that causes an exception. Do you know where the delete is coming from? I think it deletes the objects that the next operation looks for.
|
Yes after the globStatus returns an empty list the job tries to clean up and delete a _logs dir. This is expected. After the job ends the objects under the temp dir are still in swift so they were not deleted. Seems when globStatus is called there should have been some messages with "Candidate accepted" showing the objects found but those messages are missing so something went wrong in the ObjectStoreGlobber.listStatus call where nothing is returned. |
Are these files marked if the write operation is successful (i.e. does gendata.../_SUCCESS exist)? |
The _SUCCESS file is not created by LOAD |
@gilv I think this is caused by this line https://github.com/SparkTC/stocator/blob/master/src/main/java/com/ibm/stocator/fs/swift/SwiftAPIClient.java#L502 |
I reran the rest with log level set to ALL so the trace messages are shown. You can see it passes through the code noted above. |
The following lines show that APIClient.list() skips over the objects because _SUCCESS is missing.
We currently use this file to differentiate between complete and incomplete files. If it interferes with other operations we might need to find another way to do this. @gilv What do you suggest? |
Issue resolved with the introduction of the new object store globber |
Create an object with the partition structure, something like
container/data/year=2015/month=11/data1.txt
container/data/year=2016/month=12/data2.txt
container/data/year=2015/month=11/data3.txt
container/data/year=2015/month=11/data4.txt
And now access all objects of the form
container/data/year=*/month=*
Stocator will return wrong result.
We also need to make sure that null is not returned, but empty collection. When ObjectStoreGlobber.glob(path) does not find any matches it should return an empty array instead of null
The text was updated successfully, but these errors were encountered: