Skip to content

Instantly share code, notes, and snippets.

@acmiyaguchi
Last active March 2, 2017 20:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save acmiyaguchi/e5e0d55d4f7a1d9a6485a97eeec96285 to your computer and use it in GitHub Desktop.
Save acmiyaguchi/e5e0d55d4f7a1d9a6485a97eeec96285 to your computer and use it in GitHub Desktop.
Bug 1331702 - Add Wow64 sanity check
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# coding: utf-8
# # Bug 1331702 - Add Wow64 sanity check
# The test dataset was generated against [commit `51c6849`](https://github.com/mozilla/telemetry-batch-view/pull/183/commits) using the following parameters.
#
# ```
# spark-submit \
# --master yarn \
# --deploy-mode client \
# --class com.mozilla.telemetry.views.MainSummaryView \
# target/scala-2.11/telemetry-batch-view-1.1.jar \
# --bucket net-mozaws-prod-us-west-2-pipeline-analysis/amiyaguchi/main_summary_testing \
# --from 20170101 \
# --to 20170101 \
# --channel nightly
# ```
# In[12]:
df = spark.read.parquet("s3://net-mozaws-prod-us-west-2-pipeline-analysis/"
"amiyaguchi/main_summary_testing/main_summary/v3/"
"submission_date_s3=20170101/")
# The new schema should now contain `is_wow64`.
# In[13]:
"is_wow64" in df.columns
# Let's also check that the values exist. The operating system should be Windows because this attribute is Windows only.
# In[34]:
df.groupby("is_wow64").count().show()
# In[23]:
wow64 = df.where(df.is_wow64.isNotNull()).select("os", "is_wow64")
# In[24]:
wow64.count()
# In[25]:
wow64.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment