Commit b6fe2348 by WangJinfeng

fix craw package tag bug

parent ae9bcd9d
package mobvista.dmp.datasource.apptag
import mobvista.dmp.common.MobvistaConstant.{adrPkgPtn, idIosPkgPtn, iosPkgPtn}
import mobvista.dmp.common.{CommonSparkJob, MobvistaConstant}
import org.apache.commons.cli.Options
import org.apache.hadoop.fs.{FileSystem, Path}
......@@ -105,7 +106,14 @@ class CrawPkgsSpark extends CommonSparkJob with Serializable {
def getPkgs(installList: String): mutable.WrappedArray[String] = {
mutable.WrappedArray.make[String](
MobvistaConstant.String2JSONObject(installList.replaceAll(" ", "")).keySet().asScala.filter(k => {
k.startsWith("org.chromium.webapk.")
// k.startsWith("org.chromium.webapk.")
idIosPkgPtn.matcher(k).matches() || iosPkgPtn.matcher(k).matches || adrPkgPtn.matcher(k).matches
}).map(k => {
if (idIosPkgPtn.matcher(k).matches()) {
k.replace("id", "")
} else {
k
}
}).toArray)
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment