Monday, September 26, 2016

How to use Scala along with Spark for a Java Developer

Below are tips and tricks I have learnt about Spark with Scala

  1. How to create dataset of custom objects
    import spark.implicits._ class MyObj(val i: Int) // ... val d = spark.createDataset(Seq(new MyObj(1),new MyObj(2),new MyObj(3)))
    Will give you error, so instead use kyro encoder
    import spark.implicits._ class MyObj(val i: Int) implicit val myObjEncoder = org.apache.spark.sql.Encoders.kryo[MyObj]
    // ...
    val d = spark.createDataset(Seq(new MyObj(1),new MyObj(2),new MyObj(3)))


Monday, September 5, 2016

Health Benefits of Kefir I have seen personally!

Disclaimer: This is not any medical advice or prescription, please consult doctor for any health issues. These are authors personal observations.


  1. Kefir drink is rich in B vitamins, enzymes which are essential for healthy individual.
  2. Kefir drink is very beneficial for dental health  as the root cause of dental decay or any other dental problems are bad bacteria. Regular intake of water Kefir fermented with lemon or ginger improves the dental health a lot and also removes the bad breath from mouth.
  3. Candida infections are cleared. Kefir is instrumental in removing candida infections by drinking regular water Kefir. It removes candida infections in mouth, private parts.
  4. Tendency towards Alcohol is gone. Sugar craving is reduced and improved the responsible living attitude, I mean taking care of personal health.
  5. Brightens the skin by regular application on skin.
  6. Anti depressant, it inhibits the feel good feeling by boosting the serotonin production.
  7. Solves several gut issues ranging from indigestion, acidity, constipation etc.
  8. Diabetic patients need to be careful while using water kefir, as it may contain more sugars if not reduced by doing second fermentation. In my case regular drinking of second fermented drink has brought down my sugar levels to normal range.