aicam commented on code in PR #6869:
URL: https://github.com/apache/texera/pull/6869#discussion_r3730999854
##########
file-service/src/main/scala/org/apache/texera/service/type/dataset/DatasetFileNode.scala:
##########
@@ -81,15 +81,20 @@ object DatasetFileNode {
): List[DatasetFileNode] = {
val rootNode = new DatasetFileNode("/", "directory", null, "")
+ // Root the tree at the datasets prefix node (a directory node named
"datasets").
+ val datasetsNode =
+ new DatasetFileNode(ResourceType.Datasets.toString, "directory",
rootNode, "")
+ rootNode.children = Some(List(datasetsNode))
+
// Owner level nodes map
val ownerNodes = mutable.Map[String, DatasetFileNode]()
map.foreach {
case ((ownerEmail, datasetName, versionName), objects) =>
val ownerNode = ownerNodes.getOrElseUpdate(
ownerEmail, {
- val newNode = new DatasetFileNode(ownerEmail, "directory",
rootNode, ownerEmail)
- rootNode.children = Some(rootNode.getChildren :+ newNode)
+ val newNode = new DatasetFileNode(ownerEmail, "directory",
datasetsNode, ownerEmail)
+ datasetsNode.children = Some(datasetsNode.getChildren :+ newNode)
Review Comment:
dataset keyword is confusing here, we need refactoring
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]