SlideShare une entreprise Scribd logo
1  sur  17
Télécharger pour lire hors ligne
メインフレームと
  Hadoopで
大量のPDF帳票を
 出力してみた
名前:三木 大知
所属:JSOL
職業:通りすがりの
          システムエンジニア
twitter:@DaichiMiki
メインフレーム




ICON: Ravenna 3D By Double-J DesignAuthor Website: http://www.doublejdesign.co.uk/products-page/icons/ravenna-3d/
ICON: Ravenna 3D By Double-J DesignAuthor Website: http://www.doublejdesign.co.uk/products-page/icons/ravenna-3d/
PDFでペーパーレス




ICON: Ravenna 3D By Double-J DesignAuthor Website: http://www.doublejdesign.co.uk/products-page/icons/ravenna-3d/
ICON: Ravenna 3D By Double-J DesignAuthor Website: http://www.doublejdesign.co.uk/products-page/icons/ravenna-3d/
1ページ = 0.1秒




                                           4,000,000ページ




                                                                              ?秒
ICON: Ravenna 3D By Double-J DesignAuthor Website: http://www.doublejdesign.co.uk/products-page/icons/ravenna-3d/
呼んだ?




Yes, Yes, Yes!
CSV



                                                                                                                    BLOB

ICON: Ravenna 3D By Double-J DesignAuthor Website: http://www.doublejdesign.co.uk/products-page/icons/ravenna-3d/
BLOBの情報
ICON: Ravenna 3D By Double-J DesignAuthor Website: http://www.doublejdesign.co.uk/products-page/icons/ravenna-3d/
Ma
                                                                                                                                pp   er
                                                                                                                    InputFormat


                                                                                                                             Ma
                                                                                                                                pp   er
                                                                                                                    InputFormat


                                                                                                                             Ma
                                                                                                                                pp   er
                                                                                                                    InputFormat


ICON: Ravenna 3D By Double-J DesignAuthor Website: http://www.doublejdesign.co.uk/products-page/icons/ravenna-3d/
public class BLobRecordReader 
 implements RecordReader<RecordDataWritable, BytesWritable> {

    private long start;
    private long end;
    private TreeMap<BLobInfo, RecordData> infoMap;

    public BLobRecordReader(JobConf job, FileSplit split) throws Exception {
       this.start = split.getStart();
       this.end = start + split.getLength();
       this.infoMap = new TreeMap<BLobInfo, RecordData>();
       BufferedReader in = ... //from distributed cache
       String line;
       while( (line = in.readLine()) != null) {
          BLobInfo infoKey = new BLobInfo(line);
          if(start <= infoKey.getPos() && end > infoKey.getPos()) {
             infoMap.put(infoKey, new RecordData(line));
          }
       }
     ...
    }

    public boolean next(RecordDataWritable key, BytesWritable value) throws IOException {
       BLobInfo infoKey = new BLobInfo(pos);
       if(!infoMap.containsKey(infoKey))return false;
       RecordData infoData = infoMap.get(infoKey);
       key.set(infoData);
       int newSize = infoData.getFileSize();
       in.readLine(value, newSize);
       pos += newSize;
       return true;
    }

}
?


ICON: Ravenna 3D By Double-J DesignAuthor Website: http://www.doublejdesign.co.uk/products-page/icons/ravenna-3d/
60時間




元の処理
1時間



                20分


 5    10   15   20
400万ページのPDFも
  20分で出力できるよ

...そう、Hadoopならね
Thanks!

Contenu connexe

Dernier

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 

En vedette

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

メインフレームとHadoopで大量のpdf帳票を出力してみた

  • 2. 名前:三木 大知 所属:JSOL 職業:通りすがりの システムエンジニア twitter:@DaichiMiki
  • 3. メインフレーム ICON: Ravenna 3D By Double-J DesignAuthor Website: http://www.doublejdesign.co.uk/products-page/icons/ravenna-3d/
  • 4. ICON: Ravenna 3D By Double-J DesignAuthor Website: http://www.doublejdesign.co.uk/products-page/icons/ravenna-3d/
  • 5. PDFでペーパーレス ICON: Ravenna 3D By Double-J DesignAuthor Website: http://www.doublejdesign.co.uk/products-page/icons/ravenna-3d/
  • 6. ICON: Ravenna 3D By Double-J DesignAuthor Website: http://www.doublejdesign.co.uk/products-page/icons/ravenna-3d/
  • 7. 1ページ = 0.1秒 4,000,000ページ ?秒 ICON: Ravenna 3D By Double-J DesignAuthor Website: http://www.doublejdesign.co.uk/products-page/icons/ravenna-3d/
  • 9. CSV BLOB ICON: Ravenna 3D By Double-J DesignAuthor Website: http://www.doublejdesign.co.uk/products-page/icons/ravenna-3d/
  • 10. BLOBの情報 ICON: Ravenna 3D By Double-J DesignAuthor Website: http://www.doublejdesign.co.uk/products-page/icons/ravenna-3d/
  • 11. Ma pp er InputFormat Ma pp er InputFormat Ma pp er InputFormat ICON: Ravenna 3D By Double-J DesignAuthor Website: http://www.doublejdesign.co.uk/products-page/icons/ravenna-3d/
  • 12. public class BLobRecordReader implements RecordReader<RecordDataWritable, BytesWritable> { private long start; private long end; private TreeMap<BLobInfo, RecordData> infoMap; public BLobRecordReader(JobConf job, FileSplit split) throws Exception { this.start = split.getStart(); this.end = start + split.getLength(); this.infoMap = new TreeMap<BLobInfo, RecordData>(); BufferedReader in = ... //from distributed cache String line; while( (line = in.readLine()) != null) { BLobInfo infoKey = new BLobInfo(line); if(start <= infoKey.getPos() && end > infoKey.getPos()) { infoMap.put(infoKey, new RecordData(line)); } } ... } public boolean next(RecordDataWritable key, BytesWritable value) throws IOException { BLobInfo infoKey = new BLobInfo(pos); if(!infoMap.containsKey(infoKey))return false; RecordData infoData = infoMap.get(infoKey); key.set(infoData); int newSize = infoData.getFileSize(); in.readLine(value, newSize); pos += newSize; return true; } }
  • 13. ? ICON: Ravenna 3D By Double-J DesignAuthor Website: http://www.doublejdesign.co.uk/products-page/icons/ravenna-3d/
  • 15. 1時間 20分 5 10 15 20