<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1170026530183604483</id><updated>2024-12-20T16:46:18.001+05:30</updated><category term="Big data"/><category term="Cloud"/><category term="HPC"/><category term="Hadoop"/><category term="MapReduce"/><category term="Data engineering"/><category term="JDBC"/><category term="LLAMA"/><category term="LLM"/><category term="data lake"/><category term="distributed processing"/><category term="forName"/><category term="generative AI"/><category term="java"/><category term="reflections"/><category term="spark"/><title type='text'>Lateral-thinking</title><subtitle type='html'>A mixed bag of suggestions on various technical aspects.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://nilesh-mixed-bag.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1170026530183604483/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://nilesh-mixed-bag.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Nilesh</name><uri>http://www.blogger.com/profile/03567206377190647716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1170026530183604483.post-6558062762917381883</id><published>2024-04-24T15:14:00.002+05:30</published><updated>2024-04-24T15:15:44.276+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Big data"/><category scheme="http://www.blogger.com/atom/ns#" term="Cloud"/><category scheme="http://www.blogger.com/atom/ns#" term="Data engineering"/><category scheme="http://www.blogger.com/atom/ns#" term="data lake"/><category scheme="http://www.blogger.com/atom/ns#" term="distributed processing"/><category scheme="http://www.blogger.com/atom/ns#" term="Hadoop"/><category scheme="http://www.blogger.com/atom/ns#" term="HPC"/><category scheme="http://www.blogger.com/atom/ns#" term="MapReduce"/><category scheme="http://www.blogger.com/atom/ns#" term="spark"/><title type='text'>Navigating the Data Lake: Deploying Hadoop/HDFS and Spark on Kubernetes</title><content type='html'>&lt;p&gt;&lt;span style=&quot;background-color: white; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; font-weight: 600; white-space-collapse: preserve;&quot;&gt;Introduction:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 1.25em 0px; white-space-collapse: preserve;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;In the modern era of data-driven decision-making, organizations are constantly seeking innovative solutions to harness the power of big data. One such solution is the deployment of Hadoop/HDFS and Spark on Kubernetes—a strategic endeavor that requires careful planning and execution. In this blog post, I will explore the process of deploying these technologies on Kubernetes, unlocking new possibilities for data management and analysis. This is the same solution that we used when we started to build our no code/low code data pipeline and visualization platform &lt;b&gt;DataSetu. &lt;/b&gt;For Datasetu we needed to create a Data lake for processing huge dataset with high performance. This how we went about it,&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 1.25em 0px; white-space-collapse: preserve;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span color=&quot;var(--tw-prose-bold)&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; font-weight: 600;&quot;&gt;Chapter 1: Setting the Foundation with Kubernetes&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 1.25em 0px; white-space-collapse: preserve;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Before embarking on our journey to the data lake, it&#39;s essential to establish a solid foundation. Kubernetes serves as the cornerstone of our infrastructure, providing the orchestration and scalability needed to manage our distributed systems efficiently. With Kubernetes in place, we are ready to proceed with confidence, knowing that our environment is robust and reliable.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 1.25em 0px; white-space-collapse: preserve;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span color=&quot;var(--tw-prose-bold)&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; font-weight: 600;&quot;&gt;Chapter 2: Deploying Hadoop/HDFS: Building the Data Fortress&lt;/span&gt;
Our first destination in the data lake is the realm of Hadoop/HDFS—a proven solution for distributed storage and processing. By deploying Hadoop components on Kubernetes, we construct a formidable fortress to safeguard our data assets. With meticulous attention to detail, we configure HDFS settings to ensure fault tolerance and data integrity, laying the groundwork for seamless data management.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 1.25em 0px; white-space-collapse: preserve;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span color=&quot;var(--tw-prose-bold)&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; font-weight: 600;&quot;&gt;Chapter 3: Igniting Innovation with Spark&lt;/span&gt;
As we venture deeper into the data lake, we encounter the dynamic landscape of Apache Spark—a powerful engine for large-scale data processing and analytics. Deploying Spark on Kubernetes enables us to leverage its advanced capabilities while maintaining flexibility and scalability. With Spark as our catalyst, we unlock new possibilities for real-time insights and predictive analytics, driving innovation across our organization.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 1.25em 0px; white-space-collapse: preserve;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span color=&quot;var(--tw-prose-bold)&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; font-weight: 600;&quot;&gt;Chapter 4: Optimizing Performance and Reliability&lt;/span&gt;
In the ever-evolving world of big data, optimization is key to maintaining a competitive edge. We invest time and resources into fine-tuning our Kubernetes environment, optimizing resource utilization and maximizing performance. Through careful monitoring and proactive maintenance, we ensure that our Hadoop/HDFS and Spark clusters operate at peak efficiency, delivering reliable results and driving business value.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 1.25em 0px; white-space-collapse: preserve;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span color=&quot;var(--tw-prose-bold)&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; font-weight: 600;&quot;&gt;Chapter 5: Documenting the Journey&lt;/span&gt;
As our deployment journey nears its conclusion, we take a moment to reflect on the lessons learned and achievements gained. Documentation becomes our compass, guiding future endeavors and informing best practices. By capturing insights and sharing experiences, we contribute to the collective knowledge of the data community, paving the way for continued innovation and success.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 1.25em 0px; white-space-collapse: preserve;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span color=&quot;var(--tw-prose-bold)&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; font-weight: 600;&quot;&gt;Conclusion:&lt;/span&gt;
Deploying Hadoop/HDFS and Spark on Kubernetes is a strategic initiative that empowers organizations to harness the full potential of big data. By leveraging these technologies in a Kubernetes environment, businesses can achieve greater agility, scalability, and efficiency in their data operations. We have seen that with DataSetu platform. As we navigate the data lake, let us embrace the challenges and opportunities that lie ahead, knowing that with the right tools and expertise, the possibilities are limitless.&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nilesh-mixed-bag.blogspot.com/feeds/6558062762917381883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nilesh-mixed-bag.blogspot.com/2024/04/navigating-data-lake-deploying.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1170026530183604483/posts/default/6558062762917381883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1170026530183604483/posts/default/6558062762917381883'/><link rel='alternate' type='text/html' href='http://nilesh-mixed-bag.blogspot.com/2024/04/navigating-data-lake-deploying.html' title='Navigating the Data Lake: Deploying Hadoop/HDFS and Spark on Kubernetes'/><author><name>Nilesh</name><uri>http://www.blogger.com/profile/03567206377190647716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1170026530183604483.post-4162581576514867753</id><published>2024-03-21T16:07:00.000+05:30</published><updated>2024-03-21T16:14:59.539+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="generative AI"/><category scheme="http://www.blogger.com/atom/ns#" term="LLAMA"/><category scheme="http://www.blogger.com/atom/ns#" term="LLM"/><title type='text'>How to use Generative AI on custom data sets across industry to build domain specific use cases</title><content type='html'>Generative AI is transforming the landscape of machine learning by enabling the creation of new content that can mimic human-like capabilities. One of the most powerful forms of generative AI is the Large Language Model (&lt;b&gt;LLM&lt;/b&gt;), which can understand and generate human language with remarkable proficiency. &lt;br /&gt;
A key feature of LLMs is their ability to be re-trained or fine-tuned on custom data sets. This allows organizations to tailor the model&#39;s responses to specific domains or use cases. For instance, a &lt;b&gt;legal firm&lt;/b&gt; could train an LLM on legal documents to assist in drafting contracts, while a &lt;b&gt;medical research company&lt;/b&gt; could train it on scientific papers to generate new research hypotheses.
&lt;br /&gt;
The process of re-training an LLM involves several steps. First, a suitable data set must be curated. This data set should be large enough to cover the desired scope and diverse enough to enable the model to learn various patterns and nuances. Next, the model must be fine-tuned, which involves adjusting the model&#39;s parameters so that it better aligns with the new data set. Finally, the re-trained model must be evaluated to ensure that it performs as expected on tasks relevant to the new domain. Sounds easy?
&lt;br /&gt;
Re-training LLMs with custom data sets not only enhances their applicability but also improves their accuracy and efficiency in generating relevant content. As generative AI continues to evolve, the ability to customise and adapt these models will become increasingly important for businesses looking to leverage AI for competitive advantage.
&lt;br /&gt;
Fine-tuning an LLM (&lt;b&gt;Large Language Model&lt;/b&gt;) involves several critical steps to adapt the model to a specific domain. Here&#39;s a simplified overview of the process:
&lt;br /&gt;
&lt;b&gt;1) &lt;/b&gt;&lt;b&gt;Data Preparation&lt;/b&gt;: Gather a dataset that is representative of the domain or task for which the model will be fine-tuned. This dataset should include examples of the type of content the model will generate or analyze.&lt;br /&gt;
&lt;b&gt;2) &lt;/b&gt;&lt;b&gt;Model Selection&lt;/b&gt;: Choose a pre-trained LLM that best fits the size and scope of your data. Larger models may require more data but can potentially yield better results.&lt;br /&gt;
&lt;b&gt;3) &lt;/b&gt;&lt;b&gt;Parameter Adjustment&lt;/b&gt;: Modify the model&#39;s hyperparameters, such as learning rate, batch size, and number of epochs, to optimize the training process.&lt;br /&gt;
&lt;b&gt;4) &lt;/b&gt;&lt;b&gt;Training&lt;/b&gt;: Use the custom dataset to train the model, allowing it to learn from the new examples and adjust its internal weights accordingly.&lt;br /&gt;
&lt;b&gt;5) &lt;/b&gt;&lt;b&gt;Evaluation&lt;/b&gt;: Test the fine-tuned model on a separate validation set to measure its performance and make any necessary adjustments.&lt;br /&gt;
&lt;b&gt;6) &lt;/b&gt;&lt;b&gt;Deployment&lt;/b&gt;: Once satisfied with the model&#39;s performance, deploy it to start generating or analyzing content as required.&lt;br /&gt;

Keep in mind, fine-tuning is an iterative process that may require multiple rounds of adjustment and evaluation to achieve the desired performance.
&lt;br /&gt;
&lt;br /&gt;
Custom data sets for re-training LLMs can vary widely depending on the specific needs and goals of the project. Here are some examples:&lt;br /&gt;
&lt;b&gt;1) Customer Service Data&lt;/b&gt;: Transcripts of customer service calls or online chat logs can be used to train an LLM to understand and respond to customer inquiries.
&lt;br /&gt;
&lt;b&gt;2) Legal Documents&lt;/b&gt;: A collection of contracts, legal briefs, and case law can help an LLM learn the language of legal discourse for applications like automated contract analysis.
&lt;br /&gt;
&lt;b&gt;3) Medical Records&lt;/b&gt;: Anonymized patient records, treatment plans, and medical research papers can train an LLM to assist with medical diagnosis or literature review.
&lt;br /&gt;
&lt;b&gt;4) Technical Manuals&lt;/b&gt;: Manuals and documentation for specific products or technologies can help an LLM understand technical language and assist with customer support.
&lt;br /&gt;
&lt;b&gt;5) Literary Works&lt;/b&gt;: A corpus of literary texts can be used to train an LLM to generate creative writing or analyze literary styles.
&lt;br /&gt;
&lt;b&gt;6) Research Articles&lt;/b&gt;: A dataset of scientific articles from a particular field can train an LLM to summarize research findings or generate new research ideas.
&lt;br /&gt;
We need to ensure that each of these data sets are carefully prepared so that they are representative, comprehensive, and appropriately formatted for the training process.
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Let&#39;s consider a scenario where we have a dataset of customer service transcripts that we want to use to fine-tune an LLM. Below is a simplified example of how you might select, load, and train the model using this data:
&lt;br /&gt;
This shows a basic framework for fine-tuning an LLM on customer service data. It includes steps for loading the data, preparing datasets, initialising the model and tokenizer, defining training arguments, and training and evaluating the model.
&lt;/i&gt;
&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;i&gt;#python code&lt;/i&gt;
&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;import pandas as pd&lt;br /&gt;
from transformers import AutoModelForCausalLM, AutoTokenizer, TextDataset, DataCollatorForLanguageModeling&lt;br /&gt;
from transformers import Trainer, TrainingArguments&lt;br /&gt;
&lt;br /&gt;
# Load the dataset&lt;br /&gt;
data = pd.read_csv(&#39;customer_service_transcripts.csv&#39;)&lt;br /&gt;
texts = data[&#39;transcript&#39;].tolist()&lt;br /&gt;

# Select a subset of the data for training&lt;br /&gt;
train_texts = texts[:int(len(texts) * 0.9)]&lt;br /&gt;
test_texts = texts[int(len(texts) * 0.9):]&lt;br /&gt;

# Save the training and test sets&lt;br /&gt;
with open(&#39;train_data.txt&#39;, &#39;w&#39;) as f:&lt;br /&gt;
    &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;f.write(&#39;\n&#39;.join(train_texts))&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;

with open(&#39;test_data.txt&#39;, &#39;w&#39;) as f:&lt;br /&gt;
    &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;f.write(&#39;\n&#39;.join(test_texts))&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;

# Load a pre-trained model and tokenizer&lt;br /&gt;
model_name = &#39;gpt2&#39;&lt;br /&gt;
tokenizer = AutoTokenizer.from_pretrained(model_name)&lt;br /&gt;
model = AutoModelForCausalLM.from_pretrained(model_name)&lt;br /&gt;
&lt;br /&gt;
# Prepare the datasets&lt;br /&gt;
train_dataset = TextDataset(tokenizer=tokenizer,file_path=&#39;train_data.txt&#39;,block_size=128)&lt;br /&gt;

test_dataset = TextDataset(tokenizer=tokenizer,file_path=&#39;test_data.txt&#39;,block_size=128)&lt;br /&gt;

data_collator = DataCollatorForLanguageModeling(tokenizer=tokenizer, mlm=False)&lt;br /&gt;
&lt;br /&gt;
# Define training arguments&lt;br /&gt;
training_args = TrainingArguments(&lt;br /&gt;
    output_dir=&#39;./results&#39;,&lt;br /&gt;
    overwrite_output_dir=True,&lt;br /&gt;
    num_train_epochs=3,&lt;br /&gt;
    per_device_train_batch_size=4,&lt;br /&gt;
    per_device_eval_batch_size=4,&lt;br /&gt;
    eval_steps=500,&lt;br /&gt;
    save_steps=1000,&lt;br /&gt;
    warmup_steps=500,&lt;br /&gt;
    prediction_loss_only=True)&lt;br /&gt;
&lt;br /&gt;
# Initialize the Trainer&lt;br /&gt;
trainer = Trainer(&lt;br /&gt;
    model=model,&lt;br /&gt;
    args=training_args,&lt;br /&gt;
    data_collator=data_collator,&lt;br /&gt;
    train_dataset=train_dataset,&lt;br /&gt;
    eval_dataset=test_dataset)&lt;br /&gt;
&lt;br /&gt;
# Train the model&lt;br /&gt;
trainer.train()&lt;br /&gt;
&lt;br /&gt;
# Evaluate the model&lt;br /&gt;
trainer.evaluate()&lt;/span&gt;&lt;br /&gt;





&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nilesh-mixed-bag.blogspot.com/feeds/4162581576514867753/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nilesh-mixed-bag.blogspot.com/2024/03/how-to-use-generative-ai-on-custom-data.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1170026530183604483/posts/default/4162581576514867753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1170026530183604483/posts/default/4162581576514867753'/><link rel='alternate' type='text/html' href='http://nilesh-mixed-bag.blogspot.com/2024/03/how-to-use-generative-ai-on-custom-data.html' title='How to use Generative AI on custom data sets across industry to build domain specific use cases'/><author><name>Nilesh</name><uri>http://www.blogger.com/profile/03567206377190647716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1170026530183604483.post-6293045848941500624</id><published>2011-04-22T20:03:00.000+05:30</published><updated>2011-04-22T20:03:33.787+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Big data"/><category scheme="http://www.blogger.com/atom/ns#" term="Cloud"/><category scheme="http://www.blogger.com/atom/ns#" term="Hadoop"/><category scheme="http://www.blogger.com/atom/ns#" term="HPC"/><category scheme="http://www.blogger.com/atom/ns#" term="MapReduce"/><title type='text'>What is big data ? and what role Hadoop has to play?</title><content type='html'>In recent times we have been hearing , reading (in many blogs) quite often about cloud computing ,big data and HPC ie. high performance computing. Undoubtedly, these are the buzz words for this decade. If you have been in the industry for quite some time then you can recall last decade was web 2.0 decade.&lt;br /&gt;
So what is big data? Is it a new framework or new data modelling technique or part of NO SQL movement? &lt;br /&gt;
I have seen many times people relate big data to one of these or they are confused about it. Same is with HADOOP, it is thought as a NO SQL database framework.&lt;br /&gt;
Big data is nothing but just huge amount of data which requires mining. Per &lt;a href=&quot;http://en.wikipedia.org/wiki/Big_data&quot;&gt;wiki&lt;/a&gt;, Big Data is a term applied to data sets whose size is beyond the ability of commonly used software tools to capture, manage, and process the data within a tolerable elapsed time. Big data sizes are a constantly moving target currently ranging from a few dozen terabytes to many petabytes of data in a single data set.So big data is a hovering problem for organizations which deals in high volumes of data and requires  storage,search, sharing, analytics and visualizing like Google Search, Facebook, Amazon or twitter. And with time this data will only grow and the analytics or mining would become bigger a problem.&lt;br /&gt;
&lt;br /&gt;
Now the question could be how &lt;a href=&quot;http://en.wikipedia.org/wiki/Hadoop&quot;&gt;HADOOP&lt;/a&gt; comes in to picture? and are NO SQL databases are part of the problem?&lt;br /&gt;
Big data can be any kind of data either in RDBMS, NO SQL or software logs, sensors. Big Data requires exceptional technologies to efficiently process large quantities of data within tolerable elapsed times. Technologies being applied to Big Data include massively parallel processing (MPP) databases, datamining grids etc.&lt;br /&gt;
However, if we take google or facebook example. Google has it&#39;s own NO SQL database Bigtable which is nothing but a big hashmap (key-value pair) or it is data in JSON objects form. Similarly Facebook uses Cassandra for storing it&#39;s users data. The advantage of using these kind of databases is that the retrieval of data is considerably faster than the traditional RDBMS. Hence the through put is higher even with 100 millions of records.&lt;br /&gt;
So if it is that fast then where is the problem?&lt;br /&gt;
The problem is this data is unstructured unlike RDBMS where you just need to write the correct SQL to retrieve the desired data (using the grid computing or parallel computing). Hence , searching ,analyzing or visualization is a bigger problem on this kind of data. &lt;br /&gt;
Here we have &lt;a href=&quot;http://en.wikipedia.org/wiki/MapReduce&quot;&gt;MapReduce&lt;/a&gt; to rescue. MapReduce is a programming model and implementation developed by Google (Patented) for processing massive-scale, distributed data sets. And Hadoop is an Apache initiative inspired from Google&#39;s MapReduce. The framework is inspired by the map and reduce functions commonly used in functional programming.&lt;br /&gt;
Per Wiki, MapReduce is a framework for processing huge datasets on certain kinds of distributable problems using a large number of computers (nodes), collectively referred to as a cluster (if all nodes use the same hardware) or as a grid (if the nodes use different hardware). Computational processing can occur on data stored either in a filesystem (unstructured) or within a database (structured).&lt;br /&gt;
&lt;br /&gt;
How does MapReduce works?&lt;br /&gt;
For a more theoritical aspect, you can look at below figure,&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4cNH4dLeaasqL7-tT4EG90ZKSxuI7Y1PLkHo6folGeK10OvX3HnROFwG091FABPwCvuvaN7gkkagqgmFcIaqtFB1vZgrKXu9DnbzUlnhRem5D8WrUtwgH3oMXI19wOqIkwvMA97CF6k8/s1600/map_reduce_schematic1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;281&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4cNH4dLeaasqL7-tT4EG90ZKSxuI7Y1PLkHo6folGeK10OvX3HnROFwG091FABPwCvuvaN7gkkagqgmFcIaqtFB1vZgrKXu9DnbzUlnhRem5D8WrUtwgH3oMXI19wOqIkwvMA97CF6k8/s320/map_reduce_schematic1.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Hence hadoop is basically a framework for enabling powerful parallel processing of huge data. Figure below shows how MapReduce can be utilized for analytics purpose,&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiguuianLnn5PqNmuntVGDaUAcoAJ-P6-K8HrK529G-6HFLV4jkkhy99N5b3BRllCappO-n3mQqKJ69pliV6TReevkii1iLpK7fiGSAcvfKg1FbnAfRAWPMK6TmiEbKPXgZtTYZiLWKM1s/s1600/MapReduce.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;163&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiguuianLnn5PqNmuntVGDaUAcoAJ-P6-K8HrK529G-6HFLV4jkkhy99N5b3BRllCappO-n3mQqKJ69pliV6TReevkii1iLpK7fiGSAcvfKg1FbnAfRAWPMK6TmiEbKPXgZtTYZiLWKM1s/s320/MapReduce.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;References&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;[1] Hadoop Wiki: &lt;a href=&quot;http://wiki.apache.org/hadoop/PoweredBy&quot;&gt;http://wiki.apache.org/hadoop/PoweredBy&lt;/a&gt;&lt;br /&gt;
[2] Apache Hadoop: &lt;a href=&quot;http://hadoop.apache.org/&quot;&gt;http://hadoop.apache.org/&lt;/a&gt;&lt;br /&gt;
[3] Hadoop tutorial : &lt;a href=&quot;http://www.ibm.com/developerworks/java/library/j-javadev2-15/index.html&quot;&gt;http://www.ibm.com/developerworks/java/library/j-javadev2-15/index.html&lt;/a&gt;&lt;br /&gt;
[4] Blog : &lt;a href=&quot;http://cleanclouds.wordpress.com/2011/03/28/big-data-with-hadoop-cloud&quot;&gt;http://cleanclouds.wordpress.com/2011/03/28/big-data-with-hadoop-cloud&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nilesh-mixed-bag.blogspot.com/feeds/6293045848941500624/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nilesh-mixed-bag.blogspot.com/2011/04/what-is-big-data-and-what-role-hadoop.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1170026530183604483/posts/default/6293045848941500624'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1170026530183604483/posts/default/6293045848941500624'/><link rel='alternate' type='text/html' href='http://nilesh-mixed-bag.blogspot.com/2011/04/what-is-big-data-and-what-role-hadoop.html' title='What is big data ? and what role Hadoop has to play?'/><author><name>Nilesh</name><uri>http://www.blogger.com/profile/03567206377190647716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4cNH4dLeaasqL7-tT4EG90ZKSxuI7Y1PLkHo6folGeK10OvX3HnROFwG091FABPwCvuvaN7gkkagqgmFcIaqtFB1vZgrKXu9DnbzUlnhRem5D8WrUtwgH3oMXI19wOqIkwvMA97CF6k8/s72-c/map_reduce_schematic1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1170026530183604483.post-7241871441193602404</id><published>2011-01-15T16:21:00.000+05:30</published><updated>2011-01-15T16:23:14.648+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="forName"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="JDBC"/><category scheme="http://www.blogger.com/atom/ns#" term="reflections"/><title type='text'>class.forName(String className)  used in JDBC unfolded</title><content type='html'>During many interviews I have taken , I have observed even seasoned programmers find it difficult to explain the use of class.forname() method while making a JDBC connection object. In this post, I am just trying to explain this,&lt;br /&gt;
Here is a simple JDBC code,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
import java.sql.*;&lt;br /&gt;
public class JdbcConCode {&lt;br /&gt;
public static void main(String args[]) {&lt;br /&gt;
Connection con = null;&lt;br /&gt;
String url = &quot;jdbc:mysql://localhost:3306/nilesh&quot;;&lt;br /&gt;
String driver = &quot;com.mysql.jdbc.Driver&quot;;&lt;br /&gt;
String user = &quot;root&quot;;&lt;br /&gt;
String pass = &quot;nilesh&quot;;&lt;br /&gt;
try {&lt;br /&gt;
Class.forName(driver);&lt;br /&gt;
con = DriverManager.getConnection(url, user, pass);&lt;br /&gt;
System.out.println(&quot;Connection is created....&quot;);&lt;br /&gt;
//TODO&lt;br /&gt;
//rest of the code goes here&lt;br /&gt;
} catch (Exception e) {&lt;br /&gt;
System.out.println(e);&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;/i&gt;&lt;br /&gt;
Let&#39;s go through the code above, the &lt;b&gt;url&lt;/b&gt; indicates the location of the database schema, here the database is &lt;b&gt;nilesh&lt;/b&gt;.&lt;br /&gt;
Then there is &lt;b&gt;Driver&lt;/b&gt; which is the fully qualified JDBC driver class name.&lt;br /&gt;
Other two variables are used to declare the username and passwords to access the database. Just for the purpose of this code and to maintain simplicity ,I have mentioned all these variables inside the class itself, generally, this kind of details are retrived through the properties or xml files.Let&#39;s not delve into those details, the actual code starts after the &lt;b&gt;try{&lt;/b&gt; block,&lt;br /&gt;
class.forName(String className)&lt;br /&gt;
&lt;br /&gt;
Basically, here the forName() call tries to locate, load and link the driver class to JDBC API. With in java , dynamic loading is acheived by class.forName() and it is the basis of core reflection functionality provided by Java.&lt;br /&gt;
Class.forName attempts to load the class whose name is&lt;br /&gt;
given in its only argument (driver class), and returns the Class instance representing that class. In the&lt;br /&gt;
event that the Class could not be found, resolved, verified, or loaded, Class.forName&lt;br /&gt;
throws one of several different Exceptions, all of which are listed in the javadoc page for&lt;br /&gt;
java.lang.Class [1].&lt;br /&gt;
Back to the code, here the class.forName() is called as,&lt;br /&gt;
&lt;i&gt;class.forName(&quot;com.mysql.jdbc.Driver&quot;);&lt;br /&gt;
&lt;/i&gt;&lt;br /&gt;
Using the complete package name , it first locates the class binary in the classpath and then loads that as a object representation in memory.&lt;br /&gt;
Once the Driver class is loaded in memory , it&#39;s static code block is executed which has something like,&lt;br /&gt;
&lt;b&gt;&lt;i&gt;&lt;br /&gt;
static {&lt;br /&gt;
try {&lt;br /&gt;
java.sql.DriverManager.registerDriver(new Driver());&lt;br /&gt;
} catch (SQLException E) {&lt;br /&gt;
throw new RuntimeException(&quot;Can&#39;t register driver!&quot;);&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
That is the Driver gets registered with JDBC api as soon as class.forName() executes. So it calls a static method in the java.sql.DriverManager class which apparently registers a copy of itself when it loads.&lt;br /&gt;
&lt;br /&gt;
Since the Driver is registered the next line of code just get us the Connection() class object to work with database. But thats not that straight forward.&lt;br /&gt;
We all know that the &lt;b&gt;DriverManager &lt;/b&gt; class returns a database connection given a JDBC URL string, a username and a password. However, in order to create that connection, the &lt;b&gt;&lt;br /&gt;
DriverManager&lt;/b&gt; class has to know which database driver you want to use. It does that by iterating over the array (internally a Vector) of drivers that are registered with it (ie: the registerDriver(Driver driver) method ) and calls the acceptsURL(url)) method on each driver in the array, effectively asking the driver to tell it whether or not it is compatible to handle the JDBC calls. &lt;br /&gt;
So this explains how the class.forName() works for you.</content><link rel='replies' type='application/atom+xml' href='http://nilesh-mixed-bag.blogspot.com/feeds/7241871441193602404/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nilesh-mixed-bag.blogspot.com/2011/01/classfornamestring-classname-used-in.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1170026530183604483/posts/default/7241871441193602404'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1170026530183604483/posts/default/7241871441193602404'/><link rel='alternate' type='text/html' href='http://nilesh-mixed-bag.blogspot.com/2011/01/classfornamestring-classname-used-in.html' title='class.forName(String className)  used in JDBC unfolded'/><author><name>Nilesh</name><uri>http://www.blogger.com/profile/03567206377190647716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1170026530183604483.post-2440529087797386263</id><published>2010-04-25T16:28:00.001+05:30</published><updated>2010-04-26T19:26:24.865+05:30</updated><title type='text'>Exporting/Saving Putty/SecureCRT/SecureFX sessions on Windows!!</title><content type='html'>This is my first stint with blogging and I thought why not just start with sharing some useful information/tricks &amp;nbsp;that can save you some time.&lt;br /&gt;
&lt;br /&gt;
To begin with , here are couple of tips that could save you some time.&lt;br /&gt;
&lt;br /&gt;
Actually, I had once this problem where I have to take backup and move my work data to a new laptop and as we normally do , I also put my data on some external drive and copied it to the new box. During all this&amp;nbsp;exercise&amp;nbsp;I realized that by this I can only back up the data, what about the work I am doing..my configurations and installations...? What the heck...I need to spend lot of time to redo all that...crap.&lt;br /&gt;
&lt;br /&gt;
I was using Putty, SecureCRT and SecureFX to log on to client side boxes and to work upon. And all three had&amp;nbsp;at least&amp;nbsp;30 saved sessions having IP/user/pwd information, reconfiguring those sessions would be a daunting tasks. I did some research &quot;well by that I meant &lt;i&gt;googling &lt;/i&gt;also..:)&quot; and here is how a little information can help you..&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;If you are using Putty on windows...&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
Putty actually does not have any config or ini file , it writes all the user created sessions in windows registry. You can find the sessions saved in putty at&amp;nbsp;&lt;b&gt;HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions&lt;/b&gt; location. That&#39;s it...we are almost done. Just export this key and save it to some location or external drive if you plan to move to some different windows box. Last thing you need to do is import this key to any other windows system where putty is running.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;If you are using SecureFx/SecureCRT on Windows...&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
SecureCRT saves the user sessions information under windows user home directory. &lt;b&gt;&lt;home_dir&gt;\AppData\Roaming\Van Dyke Technologies\SecureCRT\Config\sessions&lt;/b&gt;. You just need to copy the &lt;b&gt;&lt;i&gt;sessions&lt;/i&gt; &lt;/b&gt;folder and save it to some location. Just as a word of caution..., with Windows 7, Microsoft has changed the users home directory to&amp;nbsp;C:\Users\&lt;username&gt;. The same is c:\documents and settings\&lt;username&gt; in WindowsXP and prior versions.&lt;/username&gt;&lt;/username&gt;&lt;/home_dir&gt;&lt;br /&gt;
I guess you know what is coming next..I need not to explain how to copy the &lt;i&gt;sessions &lt;/i&gt;folder to the same location on any other windows box where you want to setup secureCRT/SecureFX and yes...you do not want to redo all the session creations..:)&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;Please leave you comments..how did you find it? and remember.. this is my first blog..:)&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://nilesh-mixed-bag.blogspot.com/feeds/2440529087797386263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nilesh-mixed-bag.blogspot.com/2010/04/exportingsaving-puttysecurecrtsecurefx.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1170026530183604483/posts/default/2440529087797386263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1170026530183604483/posts/default/2440529087797386263'/><link rel='alternate' type='text/html' href='http://nilesh-mixed-bag.blogspot.com/2010/04/exportingsaving-puttysecurecrtsecurefx.html' title='Exporting/Saving Putty/SecureCRT/SecureFX sessions on Windows!!'/><author><name>Nilesh</name><uri>http://www.blogger.com/profile/03567206377190647716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry></feed>