Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

[REEF-952] IFileSystem for Azure BlockBlobs #645

Closed
wants to merge 3 commits into from

Conversation

afchung
Copy link
Contributor

@afchung afchung commented Nov 16, 2015

This addressed the issue by

  • Adding Azure Storage dependency to REEF.IO.
  • Implementing IFileSystem for Block Blobs.
  • Implementing and testing on "Fakes" and actual blob storage.
  • Creating proxy classes for "Fakes."

JIRA:
REEF-952

var uriSplit = directoryUri.AbsolutePath.Split(new[] {"/"}, StringSplitOptions.RemoveEmptyEntries);
if (!uriSplit.Any())
{
throw new ArgumentOutOfRangeException(@"URI must contain at least the container");
Copy link
Member

Choose a reason for hiding this comment

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

This exception type is artifact of implementation detail. Use exception type that reflects the semantics.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

This addressed the issue by
  * Adding Azure Storage dependency to REEF.IO.
  * Implementing IFileSystem for Block Blobs.
  * Implementing and testing on "Fakes" and actual blob storage.
  * Creating proxy classes for "Fakes."

JIRA:
  [REEF-952](https://issues.apache.org/jira/browse/REEF-952)

public async Task<string> StartCopyFromBlobAsync(Uri source)
{
return await _blob.StartCopyFromBlobAsync(source);
Copy link
Member

Choose a reason for hiding this comment

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

Consider using RemoveSynchronizationContextAwaiter at async entry points.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@anupam128
Copy link
Member

Changes LGTM in general. Left a few comments.

@afchung
Copy link
Contributor Author

afchung commented Nov 17, 2015

@anupam128 Ready for a second review. Thanks!

<HintPath>$(PackagesDir)\NSubstitute.1.8.2.0\lib\net45\NSubstitute.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Storage, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
Copy link
Contributor

Choose a reason for hiding this comment

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

This version seems outdated. There is a version [6.1.0])https://www.nuget.org/packages/WindowsAzure.Storage/) available. Why are we sticking with this one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We already have a reference to WindowsAzure.Storage 4.3.0 in Org.Apache.REEF.Tests. Should I upgrade that as well? Or should I just stick with this version?

@markusweimer
Copy link
Contributor

@afchung I've done a pass.

@afchung
Copy link
Contributor Author

afchung commented Nov 17, 2015

@markusweimer Addressed your comments, please have another look. Thanks!

@anupam128
Copy link
Member

+1

{
_configuration = TangFactory.GetTang().NewConfigurationBuilder()
.BindImplementation(GenericType<IFileSystem>.Class, GenericType<AzureBlockBlobFileSystem>.Class)
.BindImplementation(typeof(IAzureBlobRetryPolicy), retryPolicy.GetType())
Copy link
Contributor

Choose a reason for hiding this comment

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

If what you need is type only, you can just pass it as a named parameter of string, then get type from it. In the current way, you create an object of AzureBlobRetryPolicy but not really use it except type.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Talked with @jwang98052 offline. Provided that the IAzureBlobRetryPolicy is a small class, I will leave as is.

@markusweimer
Copy link
Contributor

+1 on merging. Can someone confirm to have run tests on this?

@afchung
Copy link
Contributor Author

afchung commented Nov 20, 2015

Sorry, pushed to wrong branch, will revert.

@afchung
Copy link
Contributor Author

afchung commented Nov 20, 2015

Reverted.

@markusweimer
Copy link
Contributor

@afchung and I just spoke, he tested this code on Azure. I will merge it.

@markusweimer
Copy link
Contributor

This doesn't build for me. @afchung Can you have a look?

The build fails due to missing metadata files for DLLs. Likely abuild order issue.

@afchung
Copy link
Contributor Author

afchung commented Nov 20, 2015

@markusweimer I was able to build it on a new clone. What were your build errors?

@afchung
Copy link
Contributor Author

afchung commented Nov 20, 2015

Seems like our builds are a bit unstable... for another PR I had to build 3 times before actually succeeding.

@markusweimer
Copy link
Contributor

I will try on the command line and see whether that works. If it does, I will merge.

@asfgit asfgit closed this in 3c35b7e Nov 20, 2015
markusweimer pushed a commit to markusweimer/reef that referenced this pull request Dec 7, 2015
This addressed the issue by
  * Adding Azure Storage dependency to REEF.IO.
  * Implementing IFileSystem for Block Blobs.
  * Implementing and testing on "Fakes" and actual blob storage.
  * Creating proxy classes for "Fakes."

JIRA:
  [REEF-952](https://issues.apache.org/jira/browse/REEF-952)

Pull Request:
  This closes apache#645
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants