{"id":338070,"date":"2022-09-07T15:01:20","date_gmt":"2022-09-07T15:01:20","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=338070"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=338070","title":{"rendered":"<span>\u0421\u043a\u043e\u043b\u044c\u043a\u043e \u0448\u043a\u043e\u043b \u0432\u043e \u0432\u0441\u0435\u043c \u043c\u0438\u0440\u0435? \u0427\u0442\u0435\u043d\u0438\u0435 \u0441\u043e\u0442\u0435\u043d \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442 OpenStreetMap \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 JVM \u0438\u0437 Apache Arrow<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>JVM \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0434\u043b\u044f Big Data \u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a Hadoop, Spark, Presto, NiFi \u043d\u043e \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u043b\u0438\u044f\u044e\u0442 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\/\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 &#171;\u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0447\u0438\u0445&#187; \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0431\u043e\u0440\u043a\u043e\u0439 \u043c\u0443\u0441\u043e\u0440\u0430 \u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 SIMD \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<p>\u0410 \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u043d\u0430 JVM \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u043e\u0442\u043d\u0438 \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442 Parquet \u0444\u0430\u0439\u043b\u043e\u0432 \u0431\u0435\u0437 Spark\/Hadoop? \u0412 \u044d\u0442\u043e\u043c \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Apache Arrow &#8212; \u043f\u0440\u043e\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044e\u0442\u0441\u044f <a href=\"https:\/\/arrow.apache.org\/powered_by\/\" rel=\"noopener noreferrer nofollow\">\u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0439<\/a> \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0411\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0414\u0430\u043d\u043d\u044b\u043c\u0438. \u041d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u0430\u0436\u0435 \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u0435\u043d \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0441 \u0442\u044b\u0441\u044f\u0447\u0430\u043c\u0438 \u044f\u0434\u0435\u0440 \u0438 \u043f\u0435\u0442\u0430\u0431\u0430\u0439\u0442\u044b \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430! \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430\u0447\u043d\u0435\u043c \u0441 &#171;\u0437\u043e\u043b\u043e\u0442\u043e\u0433\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430&#187; \u0434\u043b\u044f open source: PostgreSQL 14 + PostGIS 3.2.0, \u0430 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u043d\u0430 OpenJDK 11 + Apache Arrow 9.0.0.<\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0438\u0437\u043c\u0435\u0440\u0438\u043c \u0441 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e &#171;\u0441\u0440\u0435\u0434\u043d\u044e\u044e \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443 \u043f\u043e \u0431\u043e\u043b\u044c\u043d\u0438\u0446\u0435&#187; &#8212; \u043c\u044b \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0447\u0438\u0441\u043b\u043e \u0448\u043a\u043e\u043b\u044c\u043d\u044b\u0445 \u0437\u0434\u0430\u043d\u0438\u0439 \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u043c\u0438\u0440\u0443 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 OpenStreetMap. \u0418 \u043a\u043e\u0433\u0434\u0430 \u0433\u043e\u0432\u043e\u0440\u044f\u0442 \u0447\u0442\u043e \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e \u0438 \u0432 \u0448\u043a\u043e\u043b\u0435 \u0434\u0430\u044e\u0442 \u043c\u043d\u043e\u0433\u043e \u043b\u0438\u0448\u043d\u0438\u0445 \u0437\u043d\u0430\u043d\u0438\u0439, \u0442\u043e \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0437\u0430\u0434\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435 \u043a\u0443\u0434\u0430 \u0443\u0441\u0442\u0440\u0435\u043c\u044f\u0442\u0441\u044f \u043b\u044e\u0434\u0438 \u043e\u0441\u0432\u043e\u0431\u043e\u0434\u0438\u0432\u0448\u0438\u0435\u0441\u044f \u043e\u0442 &#171;\u043e\u043a\u043e\u0432 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f&#187; \u0438 \u0447\u0442\u043e \u043e\u043d\u0438 \u0441\u043c\u043e\u0433\u0443\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u043e \u0432\u0437\u0440\u043e\u0441\u043b\u043e\u0439 \u0436\u0438\u0437\u043d\u0438? \u0411\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430? <\/p>\n<p>\u0418\u0442\u0430\u043a, \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 &#8212; OpenStreetMap <a href=\"https:\/\/planet.openstreetmap.org\/pbf\/planet-220704.osm.pbf\" rel=\"noopener noreferrer nofollow\">planet-220704.osm.pbf<\/a> \u041a\u0430\u043a \u0438\u0445 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0432 parquet \u0444\u0430\u0439\u043b\u044b \u0437\u0434\u0435\u0441\u044c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443, \u043c\u043e\u0433\u0443 \u043b\u0438\u0448\u044c \u043f\u043e\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/github.com\/adrianulbona\/osm-parquetizer\" rel=\"noopener noreferrer nofollow\">OpenStreetMap Parquetizer<\/a> \u043a\u0430\u043a \u043e\u0434\u0438\u043d \u0438\u0437 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432.  <\/p>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 &#8212; \u0432 PostGIS \u043c\u044b \u043f\u043e\u0441\u0447\u0438\u0442\u0435\u043c \u0447\u0442\u043e  \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u043c\u0438\u0440\u0443 1005638 \u0437\u0434\u0430\u043d\u0438\u0439 \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0445 <a href=\"https:\/\/wiki.openstreetmap.org\/wiki\/RU:Tag:building%3Dschool\" rel=\"noopener noreferrer nofollow\">\u043a\u0430\u043a \u0448\u043a\u043e\u043b\u0430<\/a>. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0c1\/022\/fc4\/0c1022fc448d8fb842a987b744629a3c.png\" width=\"1475\" height=\"434\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0c1\/022\/fc4\/0c1022fc448d8fb842a987b744629a3c.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u043f\u043b\u0430\u043d\u0435\u0442\u044b \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0438\u0437 PostGIS \u0432 \u0441\u0445\u0435\u043c\u0435 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0439 \u0441 <a href=\"https:\/\/github.com\/openstreetmap\/osmosis\/blob\/84497403137fdce2adb910ecc404aacdeaf822bd\/package\/script\/pgsnapshot_schema_0.6.sql\" rel=\"noopener noreferrer nofollow\">pgsnapshot<\/a>, \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c <a href=\"https:\/\/github.com\/bytesandbrains\/h3-pg\/\" rel=\"noopener noreferrer nofollow\">h3-pg<\/a> . \u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 588 GB \u0438 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430 \u0432 \u0434\u043e\u043a\u0435\u0440 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u043d\u0430 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0435 \u0441 16\u0413\u0431 \u041e\u0417\u0423 \u0438 M.2 \u043d\u0430\u043a\u043e\u043f\u0438\u0442\u0435\u043b\u0435\u043c Samsung 970 EVO Plus:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9a7\/b9f\/9d5\/9a7b9f9d57c71f660e3719a2a290a5ee.png\" width=\"1104\" height=\"966\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9a7\/b9f\/9d5\/9a7b9f9d57c71f660e3719a2a290a5ee.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0414\u043b\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0441 \u041a\u0414\u041f\u0412 \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u044b\u043b\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u0438 \u0434\u043b\u044f \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0445 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e, \u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u0430\u043c\u0438 \u0433\u0440\u0430\u043d\u0438\u0446 \u0432 <a href=\"https:\/\/gist.githubusercontent.com\/igor-suhorukov\/d76bace649202535b46b866abfe40387\/raw\/d77f1a9acd861971bb0819adef5016897902c7e4\/schools.csv\" rel=\"noopener noreferrer nofollow\">gist<\/a>:<\/p>\n<pre><code class=\"sql\">create table school      as select h3_3, count(*) as \"count\" from ways          where closed and tags->'building' = 'school'           or (tags->'building' is not null and tags->'amenity'='school')         group by h3_3 order by 2 desc<\/code><\/pre>\n<p>\u0420\u0430\u0437\u0431\u0438\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0440\u0435\u0433\u0438\u043e\u043d\u044b \u0434\u043b\u044f \u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u0432 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 H3 \u043d\u0430 <a href=\"https:\/\/h3geo.org\/docs\/core-library\/restable\" rel=\"noopener noreferrer nofollow\">\u0443\u0440\u043e\u0432\u043d\u0435 \u0440\u0430\u0437\u0431\u0438\u0432\u043a\u0438 3<\/a>. \u0418 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432 QGIS \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u0440\u0435\u0433\u0438\u043e\u043d\u044b \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u043e\u043b\u044c\u0448\u0435 100 \u0437\u0434\u0430\u043d\u0438\u0439 \u0448\u043a\u043e\u043b \u043d\u0430 \u0440\u0435\u0433\u0438\u043e\u043d. \u041f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u0430\u044f \u043f\u043b\u043e\u0449\u0430\u0434\u044c \u0440\u0435\u0433\u0438\u043e\u043d\u0430 12393\u043a\u043c2<\/p>\n<pre><code class=\"sql\">select     h3_to_geo_boundary_geometry(h3_3::h3index),     count    from school        where count>100<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b0d\/5e4\/c9c\/b0d5e4c9cb5e610fbed6b93dce76fa33.png\" width=\"1327\" height=\"887\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b0d\/5e4\/c9c\/b0d5e4c9cb5e610fbed6b93dce76fa33.png\"\/><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d4b\/6e4\/dc9\/d4b6e4dc95711117a528ebf8800dda79.png\" width=\"1920\" height=\"1080\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d4b\/6e4\/dc9\/d4b6e4dc95711117a528ebf8800dda79.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u043d\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u0448\u043a\u043e\u043b\u043e\u043b\u0430\u043c \u0432 OpenStreetMap &#8212; \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0432\u043e\u043f\u0440\u043e\u0441. \u041e\u0431\u044b\u0447\u043d\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u043e\u043b\u0435\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b \u0432 \u0433\u043e\u0440\u043e\u0434\u0430\u0445-\u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043d\u0438\u043a\u0430\u0445. OpenStreetMap \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0442\u0435\u0445 \u0436\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u0445 \u0447\u0442\u043e \u0438 \u0432\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u044f, \u0442\u0430\u043a \u0447\u0442\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0435\u0439 \u0432\u0441\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043a \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0443. <\/p>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0443 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0448\u043a\u043e\u043b \u0432\u043e \u0432\u0441\u0435\u043c \u043c\u0438\u0440\u0435 \u043d\u0430 Apache Arrow. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 maven<\/p>\n<pre><code class=\"xml\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?> &lt;project xmlns=\"http:\/\/maven.apache.org\/POM\/4.0.0\"          xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"          xsi:schemaLocation=\"http:\/\/maven.apache.org\/POM\/4.0.0 http:\/\/maven.apache.org\/xsd\/maven-4.0.0.xsd\">     &lt;modelVersion>4.0.0&lt;\/modelVersion>      &lt;groupId>com.github.igor-suhorukov&lt;\/groupId>     &lt;artifactId>osm_parquet_dataset_example&lt;\/artifactId>     &lt;version>1.0-SNAPSHOT&lt;\/version>      &lt;properties>         &lt;maven.compiler.source>8&lt;\/maven.compiler.source>         &lt;maven.compiler.target>8&lt;\/maven.compiler.target>         &lt;arrow.version>9.0.0&lt;\/arrow.version>     &lt;\/properties>     &lt;dependencies>         &lt;dependency>             &lt;groupId>org.apache.arrow&lt;\/groupId>             &lt;artifactId>arrow-dataset&lt;\/artifactId>             &lt;version>${arrow.version}&lt;\/version>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>org.apache.arrow&lt;\/groupId>             &lt;artifactId>arrow-memory-unsafe&lt;\/artifactId>             &lt;version>${arrow.version}&lt;\/version>         &lt;\/dependency>     &lt;\/dependencies>  &lt;\/project><\/code><\/pre>\n<p>\u0418 \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0448\u043a\u043e\u043b\u044b \u043f\u043e \u043c\u0438\u0440\u0443:<\/p>\n<pre><code class=\"java\">package com.github.igorsuhorukov.arrow.osm.example;  import org.apache.arrow.dataset.file.FileFormat; import org.apache.arrow.dataset.file.FileSystemDatasetFactory; import org.apache.arrow.dataset.jni.NativeMemoryPool; import org.apache.arrow.dataset.scanner.ScanOptions; import org.apache.arrow.dataset.scanner.Scanner; import org.apache.arrow.dataset.source.Dataset; import org.apache.arrow.memory.BufferAllocator; import org.apache.arrow.memory.RootAllocator; import org.apache.arrow.util.AutoCloseables; import org.apache.arrow.vector.BitVector; import org.apache.arrow.vector.VectorSchemaRoot; import org.apache.arrow.vector.complex.MapVector; import org.apache.arrow.vector.complex.impl.UnionMapReader; import org.apache.arrow.vector.ipc.ArrowReader; import org.apache.arrow.vector.util.Text;  import java.io.File; import java.util.concurrent.atomic.AtomicLong; import java.util.stream.StreamSupport;  public class CalculateSchoolCount {      public static final int BATCH_SIZE = 100000;     public static final Text BUILDING_KEY = new Text(\"building\");     public static final Text SCHOOL_VALUE = new Text(\"school\");     public static final Text AMENITY_KEY = new Text(\"amenity\");      public static void main(String[] args) throws Exception{         if(args.length!=1){             throw new IllegalArgumentException(\"Specify source dataset path for parquet files\");         }         File datasetPath = new File(args[0]);         if(!datasetPath.exists()){             throw new IllegalArgumentException();         }          long startTime = System.currentTimeMillis();         try (BufferAllocator allocator = new RootAllocator()) {             FileSystemDatasetFactory factory = new FileSystemDatasetFactory(allocator,                     NativeMemoryPool.getDefault(), FileFormat.PARQUET, datasetPath.toURI().toURL().toExternalForm());             final Dataset dataset = factory.finish();             ScanOptions options = new ScanOptions(BATCH_SIZE);             final Scanner scanner = dataset.newScan(options);             try {                 AtomicLong totalSchoolCnt = new AtomicLong();                 StreamSupport.stream(scanner.scan().spliterator(), true).forEach(scanTask -> {                     long schoolCnt=0;                     try (ArrowReader reader = scanTask.execute()) {                         while (reader.loadNextBatch()) {                             VectorSchemaRoot root = reader.getVectorSchemaRoot();                             BitVector closed = (BitVector) root.getVector(\"closed\");                             MapVector tags = (MapVector) root.getVector(\"tags\");                             UnionMapReader tagsReader = tags.getReader();                             for(int row=0, size = root.getRowCount(); row &lt; size; row++){                                 if(closed.get(row) != 0){                                     tagsReader.setPosition(row);                                     boolean building=false;                                     boolean buildingSchool=false;                                     boolean amenitySchool=false;                                     while (tagsReader.next()){                                         Text key = (Text) tagsReader.key().readObject();                                         Text value = (Text) tagsReader.value().readObject();                                         if(key!=null &amp;&amp; key.equals(BUILDING_KEY)){                                             if(value!=null &amp;&amp; value.equals(SCHOOL_VALUE)){                                                 buildingSchool = true;                                                 break;                                             }                                             building=true;                                             if(amenitySchool){                                                 break;                                             }                                         }                                         if(key!=null &amp;&amp; value!=null &amp;&amp; key.equals(AMENITY_KEY) &amp;&amp; value.equals(SCHOOL_VALUE)){                                             amenitySchool = true;                                             if(building){                                                 break;                                             }                                         }                                     }                                     if(buildingSchool || (building &amp;&amp; amenitySchool)){                                         schoolCnt++;                                     }                                 }                             }                             tags.close();                             closed.close();                             root.close();                         }                         totalSchoolCnt.addAndGet(schoolCnt);                     } catch (Exception e) {                         throw new RuntimeException(e);                     } finally {                         AutoCloseables.closeNoChecked(scanTask);                     }                 });                 long executionTime = System.currentTimeMillis() - startTime;                 System.out.println(totalSchoolCnt.get()+\" (\"+executionTime+\" ms)\");              } finally {                 AutoCloseables.close(scanner, dataset);             }         }     } } <\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u044d\u0442\u043e\u0439 <a href=\"https:\/\/github.com\/igor-suhorukov\/osm_parquet_dataset_example\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/a>: 1005636 (806575 ms)<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/250\/65d\/566\/25065d566bc300185a9d0e6f7a67fa70.png\" width=\"1920\" height=\"1080\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/250\/65d\/566\/25065d566bc300185a9d0e6f7a67fa70.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0418\u0442\u0430\u043a, \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u0430\u043b\u0435\u043a\u043e \u043e\u0442 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043f\u043e \u043b\u0438\u0448\u043d\u0438\u043c \u0430\u043b\u043b\u043e\u043a\u0430\u0446\u0438\u044f\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u0444\u0438\u0447\u0430\u043c \u0432 java Dataset API: \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0447\u0442\u0435\u043d\u0438\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0445 \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043a\u043e\u043b\u043e\u043d\u043e\u043a, filters push-down. \u041d\u043e \u0438 \u0438\u0434\u0435\u044f \u0431\u044b\u043b\u0430 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0447\u0442\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c 188,2\u0413\u0431 \u0441\u0436\u0430\u0442\u044b\u0445 zstd Parquet \u0444\u0430\u0439\u043b\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0432 java \u0431\u0435\u0437 Hadoop\/Spark!<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d1d\/b05\/35e\/d1db0535e6fb98b9d67fa3f782cbf813.png\" width=\"839\" height=\"481\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d1d\/b05\/35e\/d1db0535e6fb98b9d67fa3f782cbf813.png\"\/><figcaption><\/figcaption><\/figure>\n<p>Dataset API \u0432 Java \u0435\u0449\u0435 \u0434\u0430\u043b\u0435\u043a \u043e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 Python, \u0442\u0430\u043a \u0447\u0442\u043e \u0434\u043b\u044f \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0445 \u043f\u043e\u043c\u043e\u0447\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u0443 \u0441 <a href=\"https:\/\/github.com\/apache\/arrow\" rel=\"noopener noreferrer nofollow\">10\u041a \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u043a\u0430\u043c\u0438 \u043d\u0430 Github<\/a> \u0442\u0443\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0440 \u0434\u043b\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439! \u0418\u0437 \u043f\u043e\u043a\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0444\u0438\u0447 &#8212; \u0440\u0430\u0431\u043e\u0442\u0430 \u0441\u043e \u0441\u0445\u0435\u043c\u0430\u043c\u0438 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 Hive\/directory\/file name style. \u0415\u0449\u0435 \u0436\u0434\u0435\u0442 \u0441\u043b\u0438\u044f\u043d\u0438\u044f <a href=\"https:\/\/github.com\/apache\/arrow\/pull\/13973\" rel=\"noopener noreferrer nofollow\">\u043c\u043e\u0439 PR<\/a> \u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 Apache ORC \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0432 java Dataset API. <\/p>\n<p>Apache Arrow \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0431\u044b\u0442\u044c \u043e\u0431\u0449\u0438\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u041e\u0417\u0423 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u043e\u043b\u043e\u043d\u043e\u0447\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0445 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f JIT \u0434\u0432\u0438\u0436\u043e\u043a \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 Gandiva \u0438 Dataset API \u043a\u0430\u043a \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0447\u0438\u0442\u0430\u0442\u044c \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u0445\u0435\u043c \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 Parquet,ORC,Arrow IPC, csv \u0438\u0437 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u043f\u043e S3 API. \u041e\u0431\u0449\u0438\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0435\u0437 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u044f\u0437\u044b\u043a\u0430\u043c\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c memory mapped \u0444\u0430\u0439\u043b\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Arrow IPC \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0438 RDMA \u0434\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0442\u044c. \u0412\u0441\u0435 \u044d\u0442\u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043e\u0441\u043d\u043e\u0432\u0443 \u0421\u0423\u0411\u0414 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0439 \u0438 \u043a\u0430\u043a \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0443\u0449\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 Spark \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e<a href=\"https:\/\/github.com\/oap-project\/gazelle_plugin\" rel=\"noopener noreferrer nofollow\"> Intel OAP<\/a>(\u0432\u0432\u0435\u043b\u0438 dataset API data source \u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u043b\u044f Spark SQL). Apache Arrow \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043e\u0439 \u0434\u043b\u044f <a href=\"https:\/\/rapids.ai\/\" rel=\"noopener noreferrer nofollow\">GPGPU Rapids<\/a> \u043e\u0442 NVidia.<\/p>\n<p>\u0414\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u0441\u0443\u044e\u0449\u0438\u0445\u0441\u044f \u043a\u0430\u043a \u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 Arrow Dataset API \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043c\u043e\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e <a href=\"https:\/\/github.com\/igor-suhorukov\/arrow_to_database\" rel=\"noopener noreferrer nofollow\">arrow_to_database<\/a> \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 Apache Parquet \u0438 Arrow IPC \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0435\u0440\u0435\u0437 JDBC \u043d\u0443 \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e <a href=\"https:\/\/arrow.apache.org\/docs\/java\/dataset.html\" rel=\"noopener noreferrer nofollow\">Apache Arrow<\/a>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0442\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Apache Arrow \u0438\u043b\u0438 \u0433\u0435\u043e\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430, \u043f\u0438\u0448\u0438\u0442\u0435 \u043f\u0440\u043e \u0447\u0442\u043e \u0445\u043e\u0442\u0435\u043b\u0438 \u0431\u044b \u0447\u0442\u043e\u0431\u044b \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043b \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435. \u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043a \u043f\u043e\u0441\u0442\u0443!<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0435\u0449\u0435 \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0442\u044c \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0442\u044c\u0441\u044f\/\u0430\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0437\u043d\u0430\u043d\u0438\u044f, \u043a\u0430\u043a \u043f\u0440\u0438\u0437\u044b\u0432\u0430\u044e\u0442 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0434\u043d\u0438 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435, \u0442\u043e IMHO \u0432\u0441\u0435 \u0441\u043a\u0430\u0442\u0438\u0442\u0441\u044f \u0442\u0443\u0434\u0430 \u0436\u0435 \u043a\u0430\u043a \u0438 \u0443 \u041f\u043d\u0435\u0432\u043c\u043e\u0441\u043b\u043e\u043d\u0430 \u0432 \u043f\u0435\u0441\u043d\u0435 &#171;\u041c\u043d\u043e\u0433\u043e\u0435 \u043c\u043e\u0436\u043d\u043e&#8230;&#187;<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/686860\/\"> https:\/\/habr.com\/ru\/post\/686860\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>JVM \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0434\u043b\u044f Big Data \u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a Hadoop, Spark, Presto, NiFi \u043d\u043e \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u043b\u0438\u044f\u044e\u0442 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\/\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 &#171;\u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0447\u0438\u0445&#187; \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0431\u043e\u0440\u043a\u043e\u0439 \u043c\u0443\u0441\u043e\u0440\u0430 \u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 SIMD \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<p>\u0410 \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u043d\u0430 JVM \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u043e\u0442\u043d\u0438 \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442 Parquet \u0444\u0430\u0439\u043b\u043e\u0432 \u0431\u0435\u0437 Spark\/Hadoop? \u0412 \u044d\u0442\u043e\u043c \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Apache Arrow &#8212; \u043f\u0440\u043e\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044e\u0442\u0441\u044f <a href=\"https:\/\/arrow.apache.org\/powered_by\/\" rel=\"noopener noreferrer nofollow\">\u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0439<\/a> \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0411\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0414\u0430\u043d\u043d\u044b\u043c\u0438. \u041d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u0430\u0436\u0435 \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u0435\u043d \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0441 \u0442\u044b\u0441\u044f\u0447\u0430\u043c\u0438 \u044f\u0434\u0435\u0440 \u0438 \u043f\u0435\u0442\u0430\u0431\u0430\u0439\u0442\u044b \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430! \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430\u0447\u043d\u0435\u043c \u0441 &#171;\u0437\u043e\u043b\u043e\u0442\u043e\u0433\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430&#187; \u0434\u043b\u044f open source: PostgreSQL 14 + PostGIS 3.2.0, \u0430 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u043d\u0430 OpenJDK 11 + Apache Arrow 9.0.0.<\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0438\u0437\u043c\u0435\u0440\u0438\u043c \u0441 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e &#171;\u0441\u0440\u0435\u0434\u043d\u044e\u044e \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443 \u043f\u043e \u0431\u043e\u043b\u044c\u043d\u0438\u0446\u0435&#187; &#8212; \u043c\u044b \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0447\u0438\u0441\u043b\u043e \u0448\u043a\u043e\u043b\u044c\u043d\u044b\u0445 \u0437\u0434\u0430\u043d\u0438\u0439 \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u043c\u0438\u0440\u0443 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 OpenStreetMap. \u0418 \u043a\u043e\u0433\u0434\u0430 \u0433\u043e\u0432\u043e\u0440\u044f\u0442 \u0447\u0442\u043e \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e \u0438 \u0432 \u0448\u043a\u043e\u043b\u0435 \u0434\u0430\u044e\u0442 \u043c\u043d\u043e\u0433\u043e \u043b\u0438\u0448\u043d\u0438\u0445 \u0437\u043d\u0430\u043d\u0438\u0439, \u0442\u043e \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0437\u0430\u0434\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435 \u043a\u0443\u0434\u0430 \u0443\u0441\u0442\u0440\u0435\u043c\u044f\u0442\u0441\u044f \u043b\u044e\u0434\u0438 \u043e\u0441\u0432\u043e\u0431\u043e\u0434\u0438\u0432\u0448\u0438\u0435\u0441\u044f \u043e\u0442 &#171;\u043e\u043a\u043e\u0432 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f&#187; \u0438 \u0447\u0442\u043e \u043e\u043d\u0438 \u0441\u043c\u043e\u0433\u0443\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u043e \u0432\u0437\u0440\u043e\u0441\u043b\u043e\u0439 \u0436\u0438\u0437\u043d\u0438? \u0411\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430? <\/p>\n<p>\u0418\u0442\u0430\u043a, \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 &#8212; OpenStreetMap <a href=\"https:\/\/planet.openstreetmap.org\/pbf\/planet-220704.osm.pbf\" rel=\"noopener noreferrer nofollow\">planet-220704.osm.pbf<\/a> \u041a\u0430\u043a \u0438\u0445 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0432 parquet \u0444\u0430\u0439\u043b\u044b \u0437\u0434\u0435\u0441\u044c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443, \u043c\u043e\u0433\u0443 \u043b\u0438\u0448\u044c \u043f\u043e\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/github.com\/adrianulbona\/osm-parquetizer\" rel=\"noopener noreferrer nofollow\">OpenStreetMap Parquetizer<\/a> \u043a\u0430\u043a \u043e\u0434\u0438\u043d \u0438\u0437 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432.  <\/p>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 &#8212; \u0432 PostGIS \u043c\u044b \u043f\u043e\u0441\u0447\u0438\u0442\u0435\u043c \u0447\u0442\u043e  \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u043c\u0438\u0440\u0443 1005638 \u0437\u0434\u0430\u043d\u0438\u0439 \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0445 <a href=\"https:\/\/wiki.openstreetmap.org\/wiki\/RU:Tag:building%3Dschool\" rel=\"noopener noreferrer nofollow\">\u043a\u0430\u043a \u0448\u043a\u043e\u043b\u0430<\/a>. <\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u043f\u043b\u0430\u043d\u0435\u0442\u044b \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0438\u0437 PostGIS \u0432 \u0441\u0445\u0435\u043c\u0435 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0439 \u0441 <a href=\"https:\/\/github.com\/openstreetmap\/osmosis\/blob\/84497403137fdce2adb910ecc404aacdeaf822bd\/package\/script\/pgsnapshot_schema_0.6.sql\" rel=\"noopener noreferrer nofollow\">pgsnapshot<\/a>, \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c <a href=\"https:\/\/github.com\/bytesandbrains\/h3-pg\/\" rel=\"noopener noreferrer nofollow\">h3-pg<\/a> . \u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 588 GB \u0438 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430 \u0432 \u0434\u043e\u043a\u0435\u0440 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u043d\u0430 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0435 \u0441 16\u0413\u0431 \u041e\u0417\u0423 \u0438 M.2 \u043d\u0430\u043a\u043e\u043f\u0438\u0442\u0435\u043b\u0435\u043c Samsung 970 EVO Plus:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u043b\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0441 \u041a\u0414\u041f\u0412 \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u044b\u043b\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u0438 \u0434\u043b\u044f \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0445 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e, \u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u0430\u043c\u0438 \u0433\u0440\u0430\u043d\u0438\u0446 \u0432 <a href=\"https:\/\/gist.githubusercontent.com\/igor-suhorukov\/d76bace649202535b46b866abfe40387\/raw\/d77f1a9acd861971bb0819adef5016897902c7e4\/schools.csv\" rel=\"noopener noreferrer nofollow\">gist<\/a>:<\/p>\n<pre><code class=\"sql\">create table school      as select h3_3, count(*) as \"count\" from ways          where closed and tags->'building' = 'school'           or (tags->'building' is not null and tags->'amenity'='school')         group by h3_3 order by 2 desc<\/code><\/pre>\n<p>\u0420\u0430\u0437\u0431\u0438\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0440\u0435\u0433\u0438\u043e\u043d\u044b \u0434\u043b\u044f \u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u0432 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 H3 \u043d\u0430 <a href=\"https:\/\/h3geo.org\/docs\/core-library\/restable\" rel=\"noopener noreferrer nofollow\">\u0443\u0440\u043e\u0432\u043d\u0435 \u0440\u0430\u0437\u0431\u0438\u0432\u043a\u0438 3<\/a>. \u0418 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432 QGIS \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u0440\u0435\u0433\u0438\u043e\u043d\u044b \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u043e\u043b\u044c\u0448\u0435 100 \u0437\u0434\u0430\u043d\u0438\u0439 \u0448\u043a\u043e\u043b \u043d\u0430 \u0440\u0435\u0433\u0438\u043e\u043d. \u041f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u0430\u044f \u043f\u043b\u043e\u0449\u0430\u0434\u044c \u0440\u0435\u0433\u0438\u043e\u043d\u0430 12393\u043a\u043c2<\/p>\n<pre><code class=\"sql\">select     h3_to_geo_boundary_geometry(h3_3::h3index),     count    from school        where count>100<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u043d\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u0448\u043a\u043e\u043b\u043e\u043b\u0430\u043c \u0432 OpenStreetMap &#8212; \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0432\u043e\u043f\u0440\u043e\u0441. \u041e\u0431\u044b\u0447\u043d\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u043e\u043b\u0435\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b \u0432 \u0433\u043e\u0440\u043e\u0434\u0430\u0445-\u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043d\u0438\u043a\u0430\u0445. OpenStreetMap \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0442\u0435\u0445 \u0436\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u0445 \u0447\u0442\u043e \u0438 \u0432\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u044f, \u0442\u0430\u043a \u0447\u0442\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0435\u0439 \u0432\u0441\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043a \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0443. <\/p>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0443 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0448\u043a\u043e\u043b \u0432\u043e \u0432\u0441\u0435\u043c \u043c\u0438\u0440\u0435 \u043d\u0430 Apache Arrow. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 maven<\/p>\n<pre><code class=\"xml\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?> &lt;project xmlns=\"http:\/\/maven.apache.org\/POM\/4.0.0\"          xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"          xsi:schemaLocation=\"http:\/\/maven.apache.org\/POM\/4.0.0 http:\/\/maven.apache.org\/xsd\/maven-4.0.0.xsd\">     &lt;modelVersion>4.0.0&lt;\/modelVersion>      &lt;groupId>com.github.igor-suhorukov&lt;\/groupId>     &lt;artifactId>osm_parquet_dataset_example&lt;\/artifactId>     &lt;version>1.0-SNAPSHOT&lt;\/version>      &lt;properties>         &lt;maven.compiler.source>8&lt;\/maven.compiler.source>         &lt;maven.compiler.target>8&lt;\/maven.compiler.target>         &lt;arrow.version>9.0.0&lt;\/arrow.version>     &lt;\/properties>     &lt;dependencies>         &lt;dependency>             &lt;groupId>org.apache.arrow&lt;\/groupId>             &lt;artifactId>arrow-dataset&lt;\/artifactId>             &lt;version>${arrow.version}&lt;\/version>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>org.apache.arrow&lt;\/groupId>             &lt;artifactId>arrow-memory-unsafe&lt;\/artifactId>             &lt;version>${arrow.version}&lt;\/version>         &lt;\/dependency>     &lt;\/dependencies>  &lt;\/project><\/code><\/pre>\n<p>\u0418 \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0448\u043a\u043e\u043b\u044b \u043f\u043e \u043c\u0438\u0440\u0443:<\/p>\n<pre><code class=\"java\">package com.github.igorsuhorukov.arrow.osm.example;  import org.apache.arrow.dataset.file.FileFormat; import org.apache.arrow.dataset.file.FileSystemDatasetFactory; import org.apache.arrow.dataset.jni.NativeMemoryPool; import org.apache.arrow.dataset.scanner.ScanOptions; import org.apache.arrow.dataset.scanner.Scanner; import org.apache.arrow.dataset.source.Dataset; import org.apache.arrow.memory.BufferAllocator; import org.apache.arrow.memory.RootAllocator; import org.apache.arrow.util.AutoCloseables; import org.apache.arrow.vector.BitVector; import org.apache.arrow.vector.VectorSchemaRoot; import org.apache.arrow.vector.complex.MapVector; import org.apache.arrow.vector.complex.impl.UnionMapReader; import org.apache.arrow.vector.ipc.ArrowReader; import org.apache.arrow.vector.util.Text;  import java.io.File; import java.util.concurrent.atomic.AtomicLong; import java.util.stream.StreamSupport;  public class CalculateSchoolCount {      public static final int BATCH_SIZE = 100000;     public static final Text BUILDING_KEY = new Text(\"building\");     public static final Text SCHOOL_VALUE = new Text(\"school\");     public static final Text AMENITY_KEY = new Text(\"amenity\");      public static void main(String[] args) throws Exception{         if(args.length!=1){             throw new IllegalArgumentException(\"Specify source dataset path for parquet files\");         }         File datasetPath = new File(args[0]);         if(!datasetPath.exists()){             throw new IllegalArgumentException();         }          long startTime = System.currentTimeMillis();         try (BufferAllocator allocator = new RootAllocator()) {             FileSystemDatasetFactory factory = new FileSystemDatasetFactory(allocator,                     NativeMemoryPool.getDefault(), FileFormat.PARQUET, datasetPath.toURI().toURL().toExternalForm());             final Dataset dataset = factory.finish();             ScanOptions options = new ScanOptions(BATCH_SIZE);             final Scanner scanner = dataset.newScan(options);             try {                 AtomicLong totalSchoolCnt = new AtomicLong();                 StreamSupport.stream(scanner.scan().spliterator(), true).forEach(scanTask -> {                     long schoolCnt=0;                     try (ArrowReader reader = scanTask.execute()) {                         while (reader.loadNextBatch()) {                             VectorSchemaRoot root = reader.getVectorSchemaRoot();                             BitVector closed = (BitVector) root.getVector(\"closed\");                             MapVector tags = (MapVector) root.getVector(\"tags\");                             UnionMapReader tagsReader = tags.getReader();                             for(int row=0, size = root.getRowCount(); row &lt; size; row++){                                 if(closed.get(row) != 0){                                     tagsReader.setPosition(row);                                     boolean building=false;                                     boolean buildingSchool=false;                                     boolean amenitySchool=false;                                     while (tagsReader.next()){                                         Text key = (Text) tagsReader.key().readObject();                                         Text value = (Text) tagsReader.value().readObject();                                         if(key!=null &amp;&amp; key.equals(BUILDING_KEY)){                                             if(value!=null &amp;&amp; value.equals(SCHOOL_VALUE)){                                                 buildingSchool = true;                                                 break;                                             }                                             building=true;                                             if(amenitySchool){                                                 break;                                             }                                         }                                         if(key!=null &amp;&amp; value!=null &amp;&amp; key.equals(AMENITY_KEY) &amp;&amp; value.equals(SCHOOL_VALUE)){                                             amenitySchool = true;                                             if(building){                                                 break;                                             }                                         }                                     }                                     if(buildingSchool || (building &amp;&amp; amenitySchool)){                                         schoolCnt++;                                     }                                 }                             }                             tags.close();                             closed.close();                             root.close();                         }                         totalSchoolCnt.addAndGet(schoolCnt);                     } catch (Exception e) {                         throw new RuntimeException(e);                     } finally {                         AutoCloseables.closeNoChecked(scanTask);                     }                 });                 long executionTime = System.currentTimeMillis() - startTime;                 System.out.println(totalSchoolCnt.get()+\" (\"+executionTime+\" ms)\");              } finally {                 AutoCloseables.close(scanner, dataset);             }         }     } } <\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u044d\u0442\u043e\u0439 <a href=\"https:\/\/github.com\/igor-suhorukov\/osm_parquet_dataset_example\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/a>: 1005636 (806575 ms)<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0418\u0442\u0430\u043a, \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u0430\u043b\u0435\u043a\u043e \u043e\u0442 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043f\u043e \u043b\u0438\u0448\u043d\u0438\u043c \u0430\u043b\u043b\u043e\u043a\u0430\u0446\u0438\u044f\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u0444\u0438\u0447\u0430\u043c \u0432 java Dataset API: \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0447\u0442\u0435\u043d\u0438\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0445 \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043a\u043e\u043b\u043e\u043d\u043e\u043a, filters push-down. \u041d\u043e \u0438 \u0438\u0434\u0435\u044f \u0431\u044b\u043b\u0430 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0447\u0442\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c 188,2\u0413\u0431 \u0441\u0436\u0430\u0442\u044b\u0445 zstd Parquet \u0444\u0430\u0439\u043b\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0432 java \u0431\u0435\u0437 Hadoop\/Spark!<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>Dataset API \u0432 Java \u0435\u0449\u0435 \u0434\u0430\u043b\u0435\u043a \u043e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 Python, \u0442\u0430\u043a \u0447\u0442\u043e \u0434\u043b\u044f \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0445 \u043f\u043e\u043c\u043e\u0447\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u0443 \u0441 <a href=\"https:\/\/github.com\/apache\/arrow\" rel=\"noopener noreferrer nofollow\">10\u041a \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u043a\u0430\u043c\u0438 \u043d\u0430 Github<\/a> \u0442\u0443\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0440 \u0434\u043b\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439! \u0418\u0437 \u043f\u043e\u043a\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0444\u0438\u0447 &#8212; \u0440\u0430\u0431\u043e\u0442\u0430 \u0441\u043e \u0441\u0445\u0435\u043c\u0430\u043c\u0438 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 Hive\/directory\/file name style. \u0415\u0449\u0435 \u0436\u0434\u0435\u0442 \u0441\u043b\u0438\u044f\u043d\u0438\u044f <a href=\"https:\/\/github.com\/apache\/arrow\/pull\/13973\" rel=\"noopener noreferrer nofollow\">\u043c\u043e\u0439 PR<\/a> \u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 Apache ORC \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0432 java Dataset API. <\/p>\n<p>Apache Arrow \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0431\u044b\u0442\u044c \u043e\u0431\u0449\u0438\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u041e\u0417\u0423 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u043e\u043b\u043e\u043d\u043e\u0447\u043d\u044b\u043c\u0438<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-338070","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/338070","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=338070"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/338070\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=338070"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=338070"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=338070"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}