object HdfsUtils extends Logging
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- HdfsUtils
- Logging
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Type Members
- implicit class StringPrefix extends AnyRef
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
backupFiles(fs: FileSystem)(filesToBackup: Seq[Path], backupParentDir: Path, dataPath: Path): Try[Path]
Create a new directory inside
backupParentDir, called "backup_{randomUUID}".Create a new directory inside
backupParentDir, called "backup_{randomUUID}". Each of the files insidefilesToBackupwill be copied in this directory, also maintaining the eventual HDFS partitioning. The new file path is created by removing the base directory (that isdataPath) from the file path, and replacing it with the path of the backup directory. Example:filesToBackup= ["/user/data/p1=a/p2=b/file.parquet"]backupParentDir= "/user"dataPath= "/user/data"- This function creates:
backupDir= "/user/backup_123' - then it copies the file into this directory, replacing the prefix "/user/data" with "/user/backup_123": "/user/backup_123/p1=a/p2=b/file.parquet"
- filesToBackup
Files that should be copied in the backup directory
- backupParentDir
Base path where to create the backup directory
- dataPath
Path containing the data that will be backup
- returns
Path of the newly created backup directory
- This function creates:
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- def deletePath(fs: FileSystem)(sourcePath: Path): Try[Unit]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def findPartitionColumns(uri: String): List[(String, String)]
- def foldIterator[T, B](iterator: RemoteIterator[T], acc: Try[B])(f: (B, T) ⇒ B)(exitPath: (B) ⇒ Boolean): Try[B]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getRawModelPathToToLoad(rawModel: RawModel, sc: SparkContext): String
- def getRawModelPathToWrite(rawModel: RawModel): String
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
logger: WaspLogger
- Attributes
- protected
- Definition Classes
- Logging
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def readRawModel(rawModel: RawModel, spark: SparkSession): Try[DataFrame]
- def replacePathPrefix(filePath: Path, prefixPathToChange: Path, newPrefix: Path): Path
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- def writeRawModel(rawModel: RawModel, df: DataFrame): Try[Unit]