зеркало из https://github.com/Azure/AzureStor.git
update for adls beta hijinks
This commit is contained in:
Родитель
21b20304e9
Коммит
90f521d8dc
|
@ -1,6 +1,6 @@
|
|||
Package: AzureStor
|
||||
Title: Storage Management in 'Azure'
|
||||
Version: 0.9.0
|
||||
Version: 1.0.0
|
||||
Authors@R: c(
|
||||
person("Hong", "Ooi", , "hongooi@microsoft.com", role = c("aut", "cre")),
|
||||
person("Microsoft", role="cph")
|
||||
|
|
4
NEWS.md
4
NEWS.md
|
@ -1,3 +1,7 @@
|
|||
# AzureStor 1.0.0
|
||||
|
||||
* Submitted to CRAN
|
||||
|
||||
# AzureStor 0.9.0
|
||||
|
||||
* Moved to cloudyr organisation
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#' - `replication`: The replication strategy for the account. The default is locally-redundant storage (LRS).
|
||||
#' - `access_tier`: The access tier, either `"hot"` or `"cool"`, for blobs.
|
||||
#' - `https_only`: Whether a HTTPS connection is required to access the storage.
|
||||
#' - `hierarchical_namespace_enabled`: Whether to enable hierarchical namespaces, which are a feature of Azure Data Lake Storage Gen 2 and provide more a efficient way to manage storage. ADLS Gen2 is currently (as of December 2018) in general-access public preview.
|
||||
#' - `hierarchical_namespace_enabled`: Whether to enable hierarchical namespaces, which are a feature of Azure Data Lake Storage Gen 2 and provide more a efficient way to manage storage. ADLS Gen2 is currently (as of December 2018) in general-access public preview. If this is enabled, the blob storage API for the account is disabled; see below.
|
||||
#' - `properties`: A list of other properties for the storage account.
|
||||
#' - ... Other named arguments to pass to the [az_storage] initialization function.
|
||||
#'
|
||||
|
@ -30,10 +30,11 @@
|
|||
#' - file storage
|
||||
#' - table storage
|
||||
#' - queue storage
|
||||
#' - Azure Data Lake Storage Gen2 (in public preview)
|
||||
#'
|
||||
#' Accounts created with `kind = "BlobStorage"` can only host blob storage, while those with `kind = "FileStorage"` can only host file storage. Accounts with `kind = "StorageV2"` can host all types of storage. Currently, AzureStor provides an R interface only to blob and file storage.
|
||||
#' Accounts created with `kind = "BlobStorage"` can only host blob storage, while those with `kind = "FileStorage"` can only host file storage. Accounts with `kind = "StorageV2"` can host all types of storage. Currently, AzureStor provides an R interface to ADLSgen2, blob and file storage.
|
||||
#'
|
||||
#' If hierarchical namespaces are enabled, there is no interoperability of the blob and ADLSgen2 storage systems. Blob containers will show up in listings of ADLS filesystems, and vice-versa, but the _contents_ of the storage are independent: files that are uploaded as blobs cannot be accessed via ADLS methods, and similarly, files and directories created via ADLS will be invisible to blob methods. Full interoperability between blobs and ADLS is planned for 2019.
|
||||
#' Currently (as of December 2018), if hierarchical namespaces are enabled, the blob API for the account is disabled. The blob endpoint is still accessible, but blob operations on the endpoint will fail. Full interoperability between blobs and ADLS is planned for 2019.
|
||||
#'
|
||||
#' @section Value:
|
||||
#' An object of class `az_storage` representing the created storage account.
|
||||
|
@ -160,7 +161,7 @@ NULL
|
|||
AzureRMR::az_resource_group$set("public", "create_storage_account", overwrite=TRUE,
|
||||
function(name, location=self$location,
|
||||
kind="StorageV2", replication="Standard_LRS",
|
||||
access_tier="hot", https_only=TRUE, hierarchical_namespace_enabled=TRUE,
|
||||
access_tier="hot", https_only=TRUE, hierarchical_namespace_enabled=FALSE,
|
||||
properties=list(), ...)
|
||||
{
|
||||
properties <- modifyList(properties,
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#' @details
|
||||
#' You can call these functions in a couple of ways: by passing the full URL of the share, or by passing the endpoint object and the name of the share as a string.
|
||||
#'
|
||||
#' If hierarchical namespaces are enabled, there is no interoperability of the blob and ADLSgen2 storage systems. Blob containers will show up in listings of ADLS filesystems, and vice-versa, but the _contents_ of the storage are independent: files that are uploaded as blobs cannot be accessed via ADLS methods, and similarly, files and directories created via ADLS will be invisible to blob methods. Full interoperability between blobs and ADLS is planned for 2019.
|
||||
#' Currently (as of December 2018), if the storage account has hierarchical namespaces enabled, the blob API for the account is disabled. The blob endpoint is still accessible, but blob operations on the endpoint will fail. Full interoperability between blobs and ADLS is planned for 2019.
|
||||
#'
|
||||
#' @return
|
||||
#' For `adls_filesystem` and `create_adls_filesystem`, an S3 object representing an existing or created filesystem respectively.
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#' @details
|
||||
#' You can call these functions in a couple of ways: by passing the full URL of the share, or by passing the endpoint object and the name of the container as a string.
|
||||
#'
|
||||
#' If hierarchical namespaces are enabled, there is no interoperability of the blob and ADLSgen2 storage systems. Blob containers will show up in listings of ADLS filesystems, and vice-versa, but the _contents_ of the storage are independent: files that are uploaded as blobs cannot be accessed via ADLS methods, and similarly, files and directories created via ADLS will be invisible to blob methods.
|
||||
#' Currently (as of December 2018), if the storage account has hierarchical namespaces enabled, the blob API for the account is disabled. The blob endpoint is still accessible, but blob operations on the endpoint will fail. Full interoperability between blobs and ADLS is planned for 2019.
|
||||
#'
|
||||
#' @return
|
||||
#' For `blob_container` and `create_blob_container`, an S3 object representing an existing or created container respectively.
|
||||
|
|
|
@ -17,8 +17,10 @@
|
|||
#'
|
||||
#' Currently AzureStor only includes methods for interacting with ADLSgen2 (experimental), blob and file storage.
|
||||
#'
|
||||
#' Currently (as of December 2018), if the storage account has hierarchical namespaces enabled, the blob API for the account is disabled. The blob endpoint is still accessible, but blob operations on the endpoint will fail. Full interoperability between blobs and ADLS is planned for 2019.
|
||||
#'
|
||||
#' @seealso
|
||||
#' [az_storage], [adls_filesystem], [create_adls_filesystem], [file_share], [create_file_share], [blob_container], [create_blob_container]
|
||||
#' [create_storage_account], [adls_filesystem], [create_adls_filesystem], [file_share], [create_file_share], [blob_container], [create_blob_container]
|
||||
#'
|
||||
#' @examples
|
||||
#' \dontrun{
|
||||
|
|
13
R/storage.R
13
R/storage.R
|
@ -100,6 +100,9 @@ public=list(
|
|||
|
||||
get_blob_endpoint=function(key=self$list_keys()[1], sas=NULL)
|
||||
{
|
||||
if(!is_empty(self$properties$isHnsEnabled) && self$properties$isHnsEnabled)
|
||||
stop("Blob endpoint not available because hierarchical namespace is enabled for this account",
|
||||
call.=FALSE)
|
||||
blob_endpoint(self$properties$primaryEndpoints$blob, key=key, sas=sas)
|
||||
},
|
||||
|
||||
|
@ -108,6 +111,11 @@ public=list(
|
|||
file_endpoint(self$properties$primaryEndpoints$file, key=key, sas=sas)
|
||||
},
|
||||
|
||||
get_adls_endpoint=function(key=self$list_keys()[1], sas=NULL)
|
||||
{
|
||||
adls_endpoint(self$properties$primaryEndpoints$dfs, key=key, sas=sas)
|
||||
},
|
||||
|
||||
regen_key=function(key=1)
|
||||
{
|
||||
body <- list(keyName=paste0("key", key))
|
||||
|
@ -116,11 +124,6 @@ public=list(
|
|||
sapply(keys, `[[`, "value")
|
||||
},
|
||||
|
||||
get_adls_endpoint=function(key=self$list_keys()[1], sas=NULL)
|
||||
{
|
||||
adls_endpoint(self$properties$primaryEndpoints$dfs, key=key, sas=sas)
|
||||
},
|
||||
|
||||
print=function(...)
|
||||
{
|
||||
cat("<Azure resource ", self$type, "/", self$name, ">\n", sep="")
|
||||
|
|
|
@ -79,7 +79,7 @@ Get, list, create, or delete ADLSgen2 filesystems. Currently (as of December 201
|
|||
\details{
|
||||
You can call these functions in a couple of ways: by passing the full URL of the share, or by passing the endpoint object and the name of the share as a string.
|
||||
|
||||
If hierarchical namespaces are enabled, there is no interoperability of the blob and ADLSgen2 storage systems. Blob containers will show up in listings of ADLS filesystems, and vice-versa, but the \emph{contents} of the storage are independent: files that are uploaded as blobs cannot be accessed via ADLS methods, and similarly, files and directories created via ADLS will be invisible to blob methods. Full interoperability between blobs and ADLS is planned for 2019.
|
||||
Currently (as of December 2018), if the storage account has hierarchical namespaces enabled, the blob API for the account is disabled. The blob endpoint is still accessible, but blob operations on the endpoint will fail. Full interoperability between blobs and ADLS is planned for 2019.
|
||||
}
|
||||
\examples{
|
||||
\dontrun{
|
||||
|
|
|
@ -87,7 +87,7 @@ Get, list, create, or delete blob containers.
|
|||
\details{
|
||||
You can call these functions in a couple of ways: by passing the full URL of the share, or by passing the endpoint object and the name of the container as a string.
|
||||
|
||||
If hierarchical namespaces are enabled, there is no interoperability of the blob and ADLSgen2 storage systems. Blob containers will show up in listings of ADLS filesystems, and vice-versa, but the \emph{contents} of the storage are independent: files that are uploaded as blobs cannot be accessed via ADLS methods, and similarly, files and directories created via ADLS will be invisible to blob methods.
|
||||
Currently (as of December 2018), if the storage account has hierarchical namespaces enabled, the blob API for the account is disabled. The blob endpoint is still accessible, but blob operations on the endpoint will fail. Full interoperability between blobs and ADLS is planned for 2019.
|
||||
}
|
||||
\examples{
|
||||
\dontrun{
|
||||
|
|
|
@ -22,7 +22,7 @@ Method for the \link[AzureRMR:az_resource_group]{AzureRMR::az_resource_group} cl
|
|||
\item \code{replication}: The replication strategy for the account. The default is locally-redundant storage (LRS).
|
||||
\item \code{access_tier}: The access tier, either \code{"hot"} or \code{"cool"}, for blobs.
|
||||
\item \code{https_only}: Whether a HTTPS connection is required to access the storage.
|
||||
\item \code{hierarchical_namespace_enabled}: Whether to enable hierarchical namespaces, which are a feature of Azure Data Lake Storage Gen 2 and provide more a efficient way to manage storage. ADLS Gen2 is currently (as of December 2018) in general-access public preview.
|
||||
\item \code{hierarchical_namespace_enabled}: Whether to enable hierarchical namespaces, which are a feature of Azure Data Lake Storage Gen 2 and provide more a efficient way to manage storage. ADLS Gen2 is currently (as of December 2018) in general-access public preview. If this is enabled, the blob storage API for the account is disabled; see below.
|
||||
\item \code{properties}: A list of other properties for the storage account.
|
||||
\item ... Other named arguments to pass to the \link{az_storage} initialization function.
|
||||
}
|
||||
|
@ -36,11 +36,12 @@ This method deploys a new storage account resource, with parameters given by the
|
|||
\item file storage
|
||||
\item table storage
|
||||
\item queue storage
|
||||
\item Azure Data Lake Storage Gen2 (in public preview)
|
||||
}
|
||||
|
||||
Accounts created with \code{kind = "BlobStorage"} can only host blob storage, while those with \code{kind = "FileStorage"} can only host file storage. Accounts with \code{kind = "StorageV2"} can host all types of storage. Currently, AzureStor provides an R interface only to blob and file storage.
|
||||
Accounts created with \code{kind = "BlobStorage"} can only host blob storage, while those with \code{kind = "FileStorage"} can only host file storage. Accounts with \code{kind = "StorageV2"} can host all types of storage. Currently, AzureStor provides an R interface to ADLSgen2, blob and file storage.
|
||||
|
||||
If hierarchical namespaces are enabled, there is no interoperability of the blob and ADLSgen2 storage systems. Blob containers will show up in listings of ADLS filesystems, and vice-versa, but the \emph{contents} of the storage are independent: files that are uploaded as blobs cannot be accessed via ADLS methods, and similarly, files and directories created via ADLS will be invisible to blob methods. Full interoperability between blobs and ADLS is planned for 2019.
|
||||
Currently (as of December 2018), if hierarchical namespaces are enabled, the blob API for the account is disabled. The blob endpoint is still accessible, but blob operations on the endpoint will fail. Full interoperability between blobs and ADLS is planned for 2019.
|
||||
}
|
||||
|
||||
\section{Value}{
|
||||
|
|
|
@ -45,6 +45,8 @@ adls_endpoint(endpoint, key = NULL, sas = NULL,
|
|||
\code{storage_endpoint} returns an object of S3 class \code{"adls_endpoint"}, \code{"blob_endpoint"}, \code{"file_endpoint"}, \code{"queue_endpoint"} or \code{"table_endpoint"} depending on the type of endpoint. All of these also inherit from class \code{"storage_endpoint"}. \code{adls_endpoint}, \code{blob_endpoint} and \code{file_endpoint} return an object of the respective class.
|
||||
|
||||
Currently AzureStor only includes methods for interacting with ADLSgen2 (experimental), blob and file storage.
|
||||
|
||||
Currently (as of December 2018), if the storage account has hierarchical namespaces enabled, the blob API for the account is disabled. The blob endpoint is still accessible, but blob operations on the endpoint will fail. Full interoperability between blobs and ADLS is planned for 2019.
|
||||
}
|
||||
\description{
|
||||
Create a storage endpoint object, for interacting with blob, file, table, queue or ADLSgen2 storage. Currently (as of December 2018) ADLSgen2 is in general-access public preview.
|
||||
|
@ -64,5 +66,5 @@ endp <- blob_endpoint("https://mystorage.blob.core.windows.net/", key="access_ke
|
|||
}
|
||||
}
|
||||
\seealso{
|
||||
\link{az_storage}, \link{adls_filesystem}, \link{create_adls_filesystem}, \link{file_share}, \link{create_file_share}, \link{blob_container}, \link{create_blob_container}
|
||||
\link{create_storage_account}, \link{adls_filesystem}, \link{create_adls_filesystem}, \link{file_share}, \link{create_file_share}, \link{blob_container}, \link{create_blob_container}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ test_that("Blob client interface works",
|
|||
{
|
||||
|
||||
storname <- paste(sample(letters, 20, replace=TRUE), collapse="")
|
||||
stor <- rg$create_storage_account(storname)
|
||||
stor <- rg$create_storage_account(storname, hierarchical_namespace_enabled=FALSE)
|
||||
|
||||
# wait until provisioning is complete
|
||||
for(i in 1:100)
|
||||
|
|
|
@ -17,7 +17,7 @@ test_that("File client interface works",
|
|||
{
|
||||
|
||||
storname <- paste(sample(letters, 20, replace=TRUE), collapse="")
|
||||
stor <- rg$create_storage_account(storname)
|
||||
stor <- rg$create_storage_account(storname, hierarchical_namespace_enabled=TRUE)
|
||||
|
||||
# wait until provisioning is complete
|
||||
for(i in 1:100)
|
||||
|
|
|
@ -48,7 +48,7 @@ test_that("ADLSgen2 client interface works",
|
|||
|
||||
lst <- list_adls_filesystems(ad)
|
||||
# list will include $xns autogenerated filesystem if hierarchical namespace enabled
|
||||
expect_true(is.list(lst) && inherits(lst[[1]], "adls_filesystem") && length(lst) == 4)
|
||||
expect_true(is.list(lst) && inherits(lst[[1]], "adls_filesystem") && length(lst) == 3)
|
||||
|
||||
expect_identical(fs, lst[["newfs1"]])
|
||||
|
||||
|
@ -103,7 +103,7 @@ test_that("ADLSgen2 client interface works",
|
|||
delete_adls_filesystem(paste0(ad$url, "newfs3"), key=ad$key, confirm=FALSE)
|
||||
Sys.sleep(5)
|
||||
# $xns autogenerated filesystem will remain if hierarchical namespace enabled
|
||||
expect_true(length(list_adls_filesystems(ad)) == 1)
|
||||
expect_true(length(list_adls_filesystems(ad)) == 0)
|
||||
})
|
||||
|
||||
rg$delete(confirm=FALSE)
|
||||
|
|
Загрузка…
Ссылка в новой задаче