R SDK for ADLS: Remove Unsupported Operations

This commit is contained in:
Omkar Aradhya 2018-07-06 22:11:51 +05:30
Родитель 19000631dc
Коммит 1c793de418
1 изменённых файлов: 0 добавлений и 49 удалений

Просмотреть файл

@ -945,52 +945,3 @@ adls.fileinputstream.close <- function(adlFileInputStream,
adlFileInputStream$buffer <- raw(0) # release byte buffer so it can be GC'ed even if app continues to hold reference to stream
return(NULL)
}
#' gets whether mark and reset are supported by `ADLFileInputStream`. Always returns false.
#'
#' @param adlFileInputStream adlFileInputStream of the file
#' @return FALSE (always)
#'
#' @family Azure Data Lake Store functions
#' @export
adls.fileinputstream.marksupported <- function(adlFileInputStream) {
if (!missing(adlFileInputStream) && !is.null(adlFileInputStream)) {
assert_that(is.adlFileInputStream(adlFileInputStream))
adlFileInputStreamCheck(adlFileInputStream)
}
return(FALSE)
}
#' Not supported by this stream. Throws `UnsupportedOperationException`
#'
#' @param adlFileInputStream adlFileInputStream of the file
#' @param readLimit ignored
#' @return NULL (void)
#'
#' @family Azure Data Lake Store functions
#' @export
adls.fileinputstream.mark <- function(adlFileInputStream, readLimit) {
if (!missing(adlFileInputStream) && !is.null(adlFileInputStream)) {
assert_that(is.adlFileInputStream(adlFileInputStream))
adlFileInputStreamCheck(adlFileInputStream)
}
stop(paste0("UnsupportedOperationException: mark()/reset() not supported on this stream - readLimit: ", readLimit))
}
#' Not supported by this stream. Throws `UnsupportedOperationException`
#'
#' @param adlFileInputStream adlFileInputStream of the file
#' @return NULL (void)
#'
#' @family Azure Data Lake Store functions
#' @export
adls.fileinputstream.reset <- function(adlFileInputStream) {
if (!missing(adlFileInputStream) && !is.null(adlFileInputStream)) {
assert_that(is.adlFileInputStream(adlFileInputStream))
adlFileInputStreamCheck(adlFileInputStream)
}
stop("UnsupportedOperationException: mark()/reset() not supported on this stream")
}