Skip to content
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

ADLS gen1-gen2-mapping #6435

Merged
merged 6 commits into from
Nov 20, 2019
Merged

Conversation

gapra-msft
Copy link
Member

No description provided.

@alzimmermsft
Copy link
Member

alzimmermsft commented Nov 20, 2019

Looking at this mapping would we want to add an exists method into Datalake? It exists (no pun intended) in Blobs, Files, and Queues and was functionality in the previous version.

Were the create flags inverted in Datalake compared to Blobs? In Blobs it won't overwrite by default (unless that changed and I missed it) and it seems strange for two closely related SDKs to have such a difference.

Should there be an API mapping comment for the remove ACL functions explaining how setAcl is capable of accomplishing this functionality (if this work similarly to how blobs and queues handle it).

Were setExpiryTime and setTimes replaced with another API that encompasses their functionality?

This is just general comments on the API and not for this PR.

@gapra-msft
Copy link
Member Author

gapra-msft commented Nov 20, 2019

Looking at this mapping would we want to add an exists method into Datalake? It exists (no pun intended) in Blobs, Files, and Queues and was functionality in the previous version.

Were the create flags inverted in Datalake compared to Blobs? In Blobs it won't overwrite by default (unless that changed and I missed it) and it seems strange for two closely related SDKs to have such a difference.

Should there be an API mapping comment for the remove ACL functions explaining how setAcl is capable of accomplishing this functionality (if this work similarly to how blobs and queues handle it).

Were setExpiryTime and setTimes replaced with another API that encompasses their functionality?

This is just general comments on the API and not for this PR.

Yep, you're right! I created an issue for the exists method #6437 and the no overwrite by default is in my TODO list as well #6104.

Also as far as I know set ACL just modifies existing ACLs, they dont work quite like blobs.
I dont think there is an API that sets times.

<td>checkExists</td>
<td>Check whether a file or directory exists.</td>
<td>N/A</td>
<td>Use Gen2 API methods <strong>createFileWithResponse</strong> and <strong>createDirectoryWithResponse</strong> and set <strong>BlobRequestConditions.setIfNoneMatch(true)</strong></td>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs to be setIfNoneMatch("*"). And didn't I also see you create an issue for adding an exists method()? That would be a better mapping

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, thanks for that catch. And I created the two issues for exists and no overwrite default, we'll have to update the doc once those features exist

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

<tr>
<td>createClient</td>
<td>Gets an ADLStoreClient object.</td>
<td><strong>DataLakeServiceClient.create</strong></td>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ServiceClientBuilder.build

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

<td>createEmptyFile</td>
<td>Creates an empty file.</td>
<td><strong>DataLakeFileClient.create</strong></td>
<td>By default this method will override an existing file, set <strong>BlobRequestConditions.setIfNoneMatch(true)</strong> to prevent overwriting.</td>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"will overwrite"; ifNoneMatch("*")

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

<td>getAclStatus</td>
<td>Queries the ACLs and permissions for a file or directory.</td>
<td><strong>DataLakeFileClient.getAccessControl</strong> and <strong>DataLakeDirectoryClient.getAccessControl</strong></td>
<td>Set <strong>ListPathsOptions.path</strong> to the desired path</td>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think ListPathsOptions are relevant here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@gapra-msft
Copy link
Member Author

Created an issue to provide enumerateDirectory functionality #6442

@gapra-msft gapra-msft merged commit facb4b6 into Azure:master Nov 20, 2019
@gapra-msft gapra-msft deleted the storage/ADLSmapping branch November 20, 2019 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants