Packages

o

org.apache.spark.sql.rapids.test

GetJsonObjectMask

object GetJsonObjectMask

Used to mask customer data to avoid customer data leakage.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GetJsonObjectMask
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. def mask(seed: Long, pathStr: String, jsonStr: String, cpuResult: String, gpuResult: String): Array[String]

    Mask data.

    Mask data. RAPIDS Accelerator should not dump the original Customer data. This dump tool only care about the functionality of get-json-object, the masked data should reproduce issues if original data/path can reproduce issues. The mask is to find a way to mask data and reproduce issues by using masked data.

    Special/retain chars, the following chars will not be masked: ASCII chars [0, 31] including space char { } [ ] , : " ' : JSON structure chars, should not mask \ : escape char, should not mask / b f n r t u : can follow \, should not mask

    • : used by number, should not mask 0-9 : used by number, it's special char, mask method refers to the following e E : used by number, e.g.: 1.0E-3, should not mask u A-F a-f : used by JSON string by unicode, e.g.: ḯ true : should not mask false : should not mask null : should not mask $ [ ] . * ' : used by path, should not mask ? : json path supports although Spark does not support, also add this because has no side effect Above special/retain chars should not be masked, or the JSON will be invalid.

    Mask logic:

    • Assume path only contains a-z, A-Z, '_' and [0-9]
    • For digits [1-9] create a random one to one mapping and replace, note do not touch '0' Because 00 number is invalid.
    • For above special/retain chars do not change
    • For char set [a-z, A-Z] minus special/retain chars like [eE1-9], create a random one to one mapping to mask data. e.g.: a -> b, b -> c, ..., z -> a
    • For other chars, e.g.: Chinese chars, map to a const char 's'
    returns

    masked data

  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  17. def toString(): String
    Definition Classes
    AnyRef → Any
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped